CVE-2017-15717 — org.apache.sling.xss
MEDIUMCVE-2017-15717 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in org.apache.sling:org.apache.sling.xss. A fix is available for org.apache.sling:org.apache.sling.xss — see the affected versions and patch details below.
Cross-site Scripting in Apache Sling XSS Protection API
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.apache.sling:org.apache.sling.xss☕org.apache.sling:org.apache.sling.xss.compatReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.sling:org.apache.sling.xss | ≥ 1.0.4&&< 2.0.4 | 2.0.4org.apache.sling:org.apache.sling.xss:2.0.4 |
| ☕Maven | org.apache.sling:org.apache.sling.xss.compat | all versions | No fix |
Affected Products
sling xss protection apiapachesling xss protection api compatapacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.sling:org.apache.sling.xss, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.sling:org.apache.sling.xss to 2.0.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2017-15717 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2017-15717 in your dependencies?
Find it across Maven, including transitive dependencies.