CVE-2016-5394
Cross site scripting in Apache Sling
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
6.1
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.
- Record
CVE-2016-5394- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2016-5394- Updated
- 2026-11-02
EUVDEUVD-2022-5871 No score
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.
- Record
EUVD-2022-5871- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-xwf4-88xr-hx2j
6.1
Cross site scripting in Apache Sling
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.
- Record
GHSA-xwf4-88xr-hx2j- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-xwf4-88xr-hx2j
6.1
Cross site scripting in Apache Sling
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.
- Record
GHSA-xwf4-88xr-hx2j- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
org.apache.sling:org.apache.sling.xssMaven |
before 1.0.12 | 1.0.12 |
org.apache.sling:org.apache.sling.xss.compatMaven |
before 1.1.0 | 1.1.0 |
org.apache.sling:org.apache.sling.xssMaven |
before 1.0.12, plus listed versions 1.0.01.0.21.0.41.0.61.0.8 |
1.0.12 |
org.apache.sling:org.apache.sling.xss.compatMaven |
before 1.1.0, plus listed versions 1.0.0 |
1.1.0 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | epicosy/VUL4J-23 | 2024-05-31 |
| PoC in GitHub | shoucheng3/apache__sling-org-apache-sling-xss_CVE-2016-5394_1-0-8 | 2025-08-18 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-5394 is a medium vulnerability (CVSS 6.1) in Apache Sling, published July 19, 2017. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 2.60%, the 85th percentile. Fixed in org.apache.sling:org.apache.sling.xss 1.0.12.
References
lists.apache.org/thread.html/332166037a54b97cf41e2b616aaed38439de94b19b204841478e4525%40%3Cdev.sling.apache.org%3E
securityfocus.com/bid/99870
nvd.nist.gov/vuln/detail/CVE-2016-5394
lists.apache.org/thread.html/332166037a54b97cf41e2b616aaed38439de94b19b204841478e4525@%3Cdev.sling.apache.org%3E
github.com/jensdietrich/xshady-release/tree/main/CVE-2016-5394
github.com/apache/sling-org-apache-sling-xss/commit/de32b144ad2be3367559f6184d560db42a220529
github.com/advisories/GHSA-xwf4-88xr-hx2j