CVE-2024-23635
Java vulnerability analysis and mitigation

Overview

A mutation XSS (mXSS) vulnerability was discovered in AntiSamy versions prior to 1.7.5. The vulnerability (CVE-2024-23635) is caused by flawed parsing of HTML being sanitized when the preserveComments directive is enabled in the policy file (GitHub Advisory).

Technical details

The vulnerability stems from parsing behavior in the neko-htmlunit dependency, where certain crafted inputs can result in elements within comment tags being interpreted as executable when using AntiSamy's sanitized output. The vulnerability has a CVSS v3.1 base score of 6.1, indicating moderate severity, with the following vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N. This means it requires network access, has low attack complexity, needs no privileges, but requires user interaction, with potential impacts to confidentiality and integrity (GitHub Advisory).

Impact

When successfully exploited, this vulnerability can lead to cross-site scripting attacks through mutation of sanitized content. The impact primarily affects confidentiality and integrity at a low level, with no direct impact on availability. The vulnerability requires the preserveComments directive to be enabled in the policy file to be exploitable (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in AntiSamy version 1.7.5 and later by updating the neko-htmlunit dependency. For users unable to upgrade immediately, a temporary workaround is available: manually edit the AntiSamy policy file (antisamy.xml) by either deleting the preserveComments directive or setting its value to false. However, this workaround is not recommended as a long-term solution as it doesn't address the root cause (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management