Cross-site Scripting in Apache Sling XSS Protection API
A flaw in the way URLs are escaped and encoded in the org.apache.sling.xss.impl.XSSAPIImpl#getValidHref and org.apache.sling.xss.impl.XSSFilterImpl#isValidHref allows special crafted URLs to pass as valid, although they carry XSS payloads. The affected versions are Apache Sling XSS Protection API 1.0.4 to 1.0.18, Apache Sling XSS Protection API Compat 1.1.0 and Apache Sling XSS Protection API 2.0.0.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.apache.sling:org.apache.sling.xss | >= 1.0.4, < 2.0.4 | 2.0.4 |
| Java / Kotlin (Maven) | org.apache.sling:org.apache.sling.xss.compat | = 1.1.0 | no fix |
References
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-79- Platform
- Java / Kotlin (Maven)
- Package
org.apache.sling:org.apache.sling.xss, org.apache.sling:org.apache.sling.xss.compat- Disclosed
- 14.05.2022
- Updated
- 11.10.2026 11:20
Sources and licenses
OSV / GitHub Advisory Database - GHSA-7mfw-43c4-45mq - CC BY 4.0
Vulnerability history: org.apache.sling:org.apache.sling.xss.compat
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 3
- First → latest
- 05.2022 05.2022
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- Medium 2
Disclosures per year
- 2022: 3
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Cross-site Scripting in Apache Sling XSS Protection API this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.