AEM Guides: Mitigating XXE vulnerabilities in custom SAX parser usage
This article explains how to address potential XML External Entity (XXE) vulnerabilities that may be flagged by security scans when using the com.adobe.fmdita.profiles.SaxParser class in custom AEM Guides workflows.
Description description
Environment
Adobe Experience Manager (AEM) Guides (all versions)
Issue/Symptoms
AEM Guides custom code may process DITA XML content from the JCR repository using the com.adobe.fmdita.profiles.SaxParser class, often obtained via profile.schema.getSaxParser(). Security scanning tools may flag this usage as a potential XXE vulnerability (CWE-611) if it is unclear whether the underlying parser disables external entity resolution.
- Static security scans report a potential XXE vulnerability in custom code that calls
com.adobe.fmdita.profiles.SaxParser.parse()on XML content.
Cause
There is no published Adobe documentation confirming whether the parser returned by profile.schema.getSaxParser() is configured to disable external entity resolution or is otherwise hardened against XXE attacks. The finding is based on static analysis, not on observed exploitation.
Resolution resolution
Follow the steps below to resolve the issue:
-
Review your custom code to identify all instances where
com.adobe.fmdita.profiles.SaxParser(or the parser returned byprofile.schema.getSaxParser()) is used to process XML content. -
If your code creates or configures XML parsers directly (such as
XMLInputFactoryorSAXParser), explicitly set the following properties to mitigate XXE risks. ForXMLInputFactory:code language-none factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
For SAXParser (if instantiated directly), ensure that features to disable external entity processing are set as appropriate.
3. If your code relies solely on the parser provided by AEM Guides and you cannot configure it directly, consider implementing additional validation or sanitization of XML input before parsing, or restrict the sources of XML content to trusted users only.
4. If your security review requires confirmation of the parser’s configuration, contact Adobe Support and reference your use of com.adobe.fmdita.profiles.SaxParser. Request information about its XXE protection status.
5. Monitor for any future updates or official documentation from Adobe regarding XXE protection in AEM Guides.
6. After applying mitigations, rerun your security scan to verify that the XXE finding is resolved.