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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.37%, higher than 32% of CVEs (2026-12-01)
- Published: 2024-02-02T16:32:50.470Z
- Modified: 2026-09-10T03:50:05.305Z
- Also known as: GHSA-2mrq-w8pv-5pvq
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- nahsra antisamy: < 1.7.5
- org.owasp.antisamy:antisamy (Maven): before 1.7.5
- antisamy_project antisamy: before 1.7.5

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/nahsra/antisamy/security/advisories/GHSA-2mrq-w8pv-5pvq> (mitigation, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-23635> (advisory)
- <https://github.com/nahsra/antisamy/commit/12a2e31d3855430c119480655c2bbbbb79a66ecd> (web)
- <https://github.com/nahsra/antisamy/commit/3e84410ed06ab67f0a4cc3183c67528210f4847d> (web)
- <https://github.com/nahsra/antisamy> (package)

## Sources

- CVE List: [CVE-2024-23635](https://www.cve.org/CVERecord?id=CVE-2024-23635), CVE Terms of Use, modified 2024-08-01
- GitHub Advisory Database: [GHSA-2mrq-w8pv-5pvq](https://github.com/advisories/GHSA-2mrq-w8pv-5pvq), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-23635](https://nvd.nist.gov/vuln/detail/CVE-2024-23635), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-23635 · Whole record: https://cve.day/CVE-2024-23635.json · Rebuilt by cve.day 2026-11-25T22:58:36.528Z
