XSS in Apache Sling
CVE-2016-5394
In the XSS Protection API module before 1.0.12 in Apache Sling, the encoding done by the XSSAPI.encodeForJSString() method is not restrictive enough and for some input patterns allows script tags to pass through unencoded, leading to potential XSS vulnerabilities.
Vulnerability class: XSS (Cross-Site Scripting)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.1 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
EPSS exploit prediction
EPSS 0.026, 85.6th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Apache Sling
- Apache Software Foundation Sling — versions prior to 1.0.12
Weakness classification (CWE)
Public exploits and proof-of-concept code
2 public repositories with exploit or proof-of-concept code for this CVE:
- shoucheng3/apache__sling-org-apache-sling-xss_CVE-2016-5394_1-0-8 (last pushed 2025-08-18)
- epicosy/VUL4J-23 (last pushed 2024-05-31): apache/sling with CVE-2016-5394
Also mentioned in 2 other repositories (ARPSyndicate/cve-scores, jensdietrich/xshady-release). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- lists.apache.org/thread.html/332166037a54b97cf41e2b616aaed38439de94b19b20484147…
- www.securityfocus.com/bid/99870 (Third Party Advisory, VDB Entry, vdb-entry)
This CVE has public exploit evidence. See the latest CVEs with public exploits.