CVE-2017-14735: OWASP AntiSamy Cross-site Scripting vulnerability in org.owasp.antisamy:antisamy
Summary
CVE-2017-14735: OWASP AntiSamy Cross-site Scripting vulnerability. Affects org.owasp.antisamy:antisamy versions < 1.5.7. Fixed in 1.5.7. How to fix ↓
Also tracked for
- libowasp-antisamy-java · Debian:11
The same CVE-2017-14735 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
OWASP AntiSamy is a Java library that helps developers protect web applications from malicious HTML and JavaScript code. It provides a set of rules and filters to sanitize user input and prevent cross-site scripting (XSS) attacks. However, versions prior to 1.5.7 are vulnerable to a specific type of XSS attack using HTML5 entities, specifically the use of : to construct a javascript: URL.
Vulnerability Detail
The vulnerability in OWASP AntiSamy allows an attacker to inject malicious code into a web application by exploiting the XSS vulnerability. By using HTML5 entities, an attacker can bypass the input sanitization process and execute arbitrary JavaScript code in the context of the victim's browser. This can lead to various consequences, such as stealing sensitive information, session hijacking, or performing actions on behalf of the victim.
How To Fix
Minimum fixed version
1.5.7
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
If upgrading to the latest version is not immediately feasible, a temporary workaround is to manually sanitize user input using a different library or custom code. Ensure that all user-supplied data is properly validated and sanitized before being rendered in HTML or JavaScript contexts. Use OWASP's XSS Prevention Cheat Sheet as a reference for secure coding practices.
Conclusion
The OWASP AntiSamy library prior to version 1.5.7 is vulnerable to a cross-site scripting (XSS) attack using HTML5 entities. This can lead to various security risks, including data theft and unauthorized access. It is crucial to upgrade to the latest version of the library and follow secure coding practices to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for org.owasp.antisamy:antisamy →
FAQ
OWASP AntiSamy is a Java library that helps protect web applications from malicious HTML and JavaScript code. It provides a set of rules and filters to sanitize user input and prevent cross-site scripting (XSS) attacks.
Cross-site scripting (XSS) is a type of security vulnerability where an attacker injects malicious code into a web application, which is then executed by the victim's browser. This can lead to various consequences, such as stealing sensitive information or performing actions on behalf of the victim.
The vulnerability in OWASP AntiSamy allows an attacker to bypass the input sanitization process by using HTML5 entities, specifically the use of : to construct a javascript: URL. This enables the injection of arbitrary JavaScript code into a web application, leading to potential XSS attacks.
The consequences of this vulnerability include the ability for an attacker to steal sensitive information, perform actions on behalf of the victim, or hijack user sessions. This can lead to unauthorized access, data breaches, and other security incidents.
To protect your application, it is recommended to upgrade to version 1.5.7 or later of org.owasp.antisamy:antisamy. Additionally, ensure that all user-supplied data is properly validated and sanitized before being rendered in HTML or JavaScript contexts. Follow secure coding practices and refer to OWASP's XSS Prevention Cheat Sheet for guidance.
Related vulnerabilities
Recent vulnerabilities recorded for org.owasp.antisamy:antisamy.