# CVE-2024-23635: AntiSamy malicious input can provoke XSS when preserving comments

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-02-02 · Modified: 2024-08-01
- Aliases: UBUNTU-CVE-2024-23635, DEBIAN-CVE-2024-23635, GHSA-2mrq-w8pv-5pvq
- Record: https://cvemate.com/vulnerability/CVE-2024-23635 · JSON: https://cvemate.com/vulnerability/CVE-2024-23635/json

## Description

```text
AntiSamy is a library for performing fast, configurable cleansing of HTML coming from untrusted sources. Prior to 1.7.5, there is a potential for a mutation XSS (mXSS) vulnerability in AntiSamy caused by flawed parsing of the HTML being sanitized. To be subject to this vulnerability the `preserveComments` directive must be enabled in your policy file. As a result, certain crafty inputs can result in elements in comment tags being interpreted as executable when using AntiSamy's sanitized output. Patched in AntiSamy 1.7.5 and later.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.368%, percentile 32.657%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- antisamy\_project antisamy: \< 1.7.5
- debian libowasp-antisamy-java (Debian): All versions (No fix recorded) \| \< 1.7.8-1
- ubuntu libowasp-antisamy-java (Ubuntu): All versions (No fix recorded)
- org.owasp.antisamy antisamy (Maven): \< 1.7.5
- nahsra antisamy: \< 1.7.5

## References

- <https://github.com/nahsra/antisamy/security/advisories/GHSA-2mrq-w8pv-5pvq>
- <https://ubuntu.com/security/CVE-2024-23635>
- <https://www.cve.org/CVERecord?id=CVE-2024-23635>
- <https://security-tracker.debian.org/tracker/CVE-2024-23635>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-23635>
- <https://github.com/nahsra/antisamy/commit/12a2e31d3855430c119480655c2bbbbb79a66ecd>
- <https://github.com/nahsra/antisamy/commit/3e84410ed06ab67f0a4cc3183c67528210f4847d>
- <https://github.com/nahsra/antisamy>

---

Data as of 2026-12-05T07:08:54.430Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
