XML External Entity Reference in Apache Sling
Date: 2022-05
Affected: maven/org.apache.sling:org.apache.sling.xss.compat, maven/org.apache.sling:org.apache.sling.xss
Attack vector: ssrf
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2016-6798
CWE: CWE-611
CVSS: 9.8 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

In the XSS Protection API module before 1.0.12 in Apache Sling, the method XSS.getValidXML() uses an insecure SAX parser to validate the input string, which allows for XXE attacks in all scripts which use this method to validate user input, potentially allowing an attacker to read sensitive data on the filesystem, perform same-site-request-forgery (SSRF), port-scanning behind the firewall or DoS the application.


Mitigations:

Architectural layers (MAESTRO):