CVE-2017-15717
Description
Apache Sling XSS Protection API improperly escapes URLs, allowing crafted href values to bypass sanitization and inject XSS payloads.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Apache Sling XSS Protection API improperly escapes URLs, allowing crafted href values to bypass sanitization and inject XSS payloads.
Vulnerability
A flaw in the URL escaping and encoding logic within org.apache.sling.xss.impl.XSSAPIImpl#getValidHref and org.apache.sling.xss.impl.XSSFilterImpl#isValidHref allows specially crafted URLs to pass validation while still carrying 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 [1].
Exploitation
An attacker can craft a malicious URL that bypasses the getValidHref and isValidHref checks. The attacker does not require any special network position or authentication; the vulnerability is triggered when a user or application processes an untrusted URL through the affected API functions. The exact steps involve supplying a URL with malformed encoding that the sanitization routines fail to parse correctly, resulting in a valid href that contains embedded JavaScript or other XSS payloads.
Impact
Successful exploitation allows an attacker to perform cross-site scripting (XSS) attacks. When the crafted URL is rendered in a browser context (for example, as a link or redirect target), it can execute arbitrary JavaScript in the victim's session, leading to information disclosure, session hijacking, or other client-side attacks. The impact is limited to the client-side context where the URL is used, but can compromise the confidentiality and integrity of user data within that session.
Mitigation
Users should upgrade to Apache Sling XSS Protection API version 1.0.20 or later, Apache Sling XSS Protection API Compat version 1.1.2 or later, and Apache Sling XSS Protection API 2.0.2 or later, as these releases contain the fix [1]. No workarounds are documented in the available references. If an upgrade is not immediately possible, avoid processing untrusted URLs through the affected API functions.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.apache.sling:org.apache.sling.xssMaven | >= 1.0.4, < 2.0.4 | 2.0.4 |
Affected products
3- ghsa-coords2 versionspkg:maven/org.apache.sling/org.apache.sling.xsspkg:maven/org.apache.sling/org.apache.sling.xss.compat
>= 1.0.4, < 2.0.4+ 1 more
- (no CPE)range: >= 1.0.4, < 2.0.4
- (no CPE)
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-7mfw-43c4-45mqghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2017-15717ghsaADVISORY
- s.apache.org/CVE-2017-15717ghsamailing-listx_refsource_MLISTWEB
News mentions
0No linked articles in our index yet.