Xxe injection

From zakirkun/ice-tea · View interactive version

Xxe injection is an AI agent skill from the GitHub repository zakirkun/ice-tea. Detects XML parsers configured to process external entities, enabling file disclosure and SSRF.

How to use this skill

Skill file

XML External Entity (XXE) Injection

Overview

XXE occurs when an XML parser processes external entity references within XML input. Attackers can:

Detection Strategy

Look for XML parsing operations that do not explicitly disable external entity resolution:

Remediation

Disable DTD processing and external entities entirely, or use a secure XML parsing library.

Vulnerable (Java):

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder(); // XXE enabled by default!

Safe (Java):

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.