CVE-2017-15717: Cross-site Scripting in Apache Sling XSS Protection API

Summary

14/05/2022
Yes i
Moderate
6.1

CVE-2017-15717: Cross-site Scripting in Apache Sling XSS Protection API. Affects org.apache.sling:org.apache.sling.xss versions >= 1.0.4, < 2.0.4. Fixed in 2.0.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Apache Sling XSS Protection API is a library that provides protection against cross-site scripting (XSS) attacks in Apache Sling applications. It offers various methods for escaping and encoding URLs to prevent the execution of malicious scripts. However, versions 1.0.4 to 1.0.18 of the API, as well as version 1.1.0 of the API Compat and version 2.0.0 of the API, contain a vulnerability that allows specially crafted URLs to bypass the XSS protection and execute XSS payloads.

Vulnerability Detail

The vulnerability arises from a flaw in the URL escaping and encoding process within the org.apache.sling.xss.impl.XSSAPIImpl#getValidHref and org.apache.sling.xss.impl.XSSFilterImpl#isValidHref methods. Attackers can exploit this flaw by crafting URLs that carry XSS payloads, which are mistakenly considered valid by the affected versions of the API. This can lead to the execution of malicious scripts in the context of the vulnerable application, potentially compromising user data and system integrity. The vulnerability has a CVSS score of 6.1 (Moderate).

How To Fix

Minimum fixed version

2.0.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to a fixed version of the Apache Sling XSS Protection API to mitigate the risk of XSS attacks.

Conclusion

In conclusion, the Apache Sling XSS Protection API is vulnerable to a cross-site scripting (XSS) attack due to a flaw in the URL escaping and encoding process. This vulnerability can be mitigated by upgrading to version 2.0.4 or a subsequent secure version of the API. It is recommended to promptly update affected applications to ensure the proper protection against XSS attacks. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.sling:org.apache.sling.xss →

Share this vulnerability

FAQ

The Apache Sling XSS Protection API is a library that provides protection against cross-site scripting (XSS) attacks in Apache Sling applications. It offers methods for escaping and encoding URLs to prevent the execution of malicious scripts.

Versions 1.0.4 to 1.0.18 of the API, as well as version 1.1.0 of the API Compat and version 2.0.0 of the API, are affected by this vulnerability.

The vulnerability allows attackers to execute cross-site scripting (XSS) attacks in the context of the vulnerable application. This can lead to the compromise of user data and system integrity.

The CVSS score of this vulnerability is 6.1 (Moderate).

No, there is no known workaround for this vulnerability. It is crucial to upgrade to a fixed version of the Apache Sling XSS Protection API.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.sling:org.apache.sling.xss.

How To Fix

Minimum fixed version

2.0.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback