Every CVE Search/ Get API key

CVE-2016-5394

Cross site scripting in Apache Sling

6.1 MediumPublic exploitFix available

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

2.60%Up 1.7 points since Feb 4, 2022
90%50%10%1%

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 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 2.0
4.3 MediumAV: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
org.apache.sling:org.apache.sling.xss
Maven
before 1.0.12
1.0.12
org.apache.sling:org.apache.sling.xss.compat
Maven
before 1.1.0
1.1.0
org.apache.sling:org.apache.sling.xss
Maven
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.compat
Maven
before 1.1.0, plus listed versions
1.0.0
1.1.0

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubepicosy/VUL4J-232024-05-31
PoC in GitHubshoucheng3/apache__sling-org-apache-sling-xss_CVE-2016-5394_1-0-82025-08-18

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE 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

MoveEnter Open