diff --git a/strix/prompts/vulnerabilities/xxe.jinja b/strix/prompts/vulnerabilities/xxe.jinja index ac00619..510e6a1 100644 --- a/strix/prompts/vulnerabilities/xxe.jinja +++ b/strix/prompts/vulnerabilities/xxe.jinja @@ -145,46 +145,6 @@ evil.dtd: - - -```java -DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); -f.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); -f.setFeature("http://xml.org/sax/features/external-general-entities", false); -f.setFeature("http://xml.org/sax/features/external-parameter-entities", false); -f.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", true); -f.setAttribute("http://javax.xml.XMLConstants/property/accessExternalDTD", ""); -f.setAttribute("http://javax.xml.XMLConstants/property/accessExternalSchema", ""); -``` - - - -```csharp -var settings = new XmlReaderSettings { - DtdProcessing = DtdProcessing.Prohibit, - XmlResolver = null -}; -``` - - - -```python -from lxml import etree -parser = etree.XMLParser(resolve_entities=False, no_network=True) -etree.fromstring(xml_bytes, parser) -# Prefer defusedxml for stdlib parsers -``` - - - -```php -$dom = new DOMDocument(); -// Do NOT use LIBXML_NOENT; forbid network -$dom->loadXML($xml, LIBXML_NONET | LIBXML_NOERROR | LIBXML_NOWARNING); -``` - - - 1. Provide a minimal payload proving parser capability (DOCTYPE/XInclude/XSLT). 2. Demonstrate controlled access (file path or internal URL) with reproducible evidence.