☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.1 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-23635

CVE-2024-23635 Cross-Site Scripting in Owasp
📅 PUBLISHED: 2024-02-02 16:32 UTC 🔄 UPDATED: 2026-09-23 20:27 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.37%
👁️
0.37% probability
9.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-23635 is a mutation Cross-Site Scripting (mXSS) vulnerability in the OWASP AntiSamy library, versions prior to 1.7.5. The flaw arises from flawed HTML parsing when the preserveComments directive is enabled in the policy file. An attacker can craft input that, when sanitized by AntiSamy, results in HTML comment tags being misinterpreted as executable code, leading to XSS. The CVSS score is 6.1 (Medium), and the EPSS probability is 0.0%, indicating low active exploitation. No public exploit code or Nuclei template is available. The patch is available in AntiSamy 1.7.5.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

AntiSamy is a Java library distributed via Maven Central. Organizations using AntiSamy in their Java web applications should immediately update to version 1.7.5 or later. The vulnerability is introduced through the library's dependency chain, and any application using a vulnerable version with preserveComments enabled is at risk. Verify the library version in your pom.xml or build.gradle file.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Base Score: 6.1 (Medium)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: Required (UI:R) – victim must view sanitized output
  • Scope: Changed (S:C) – vulnerable component impacts resources beyond its security scope
  • Confidentiality Impact: Low (C:L)
  • Integrity Impact: Low (I:L)
  • Availability Impact: None (A:N)

Threat Level: Medium. The requirement for preserveComments to be enabled and the need for user interaction reduce the risk, but successful exploitation can lead to XSS attacks.

Deep Dive & Mechanics

The vulnerability is a mutation XSS (mXSS) that exploits the way AntiSamy parses HTML comments when preserveComments is enabled. Normally, HTML comments (<!-- ... -->) are stripped or preserved as inert text. However, due to a parsing flaw, certain crafted inputs can cause the sanitizer to misinterpret comment boundaries, allowing elements inside comments to be treated as active HTML after sanitization.

Root Cause: The HTML parser in AntiSamy does not correctly handle nested or malformed comment structures when preserveComments is active. This allows an attacker to inject a payload that, after sanitization, becomes executable JavaScript.

Attack Vector: An attacker submits crafted HTML to an application that uses AntiSamy for sanitization. The application then outputs the sanitized HTML to a victim's browser, where the mXSS payload executes.

Prerequisites:

  • AntiSamy version < 1.7.5
  • preserveComments directive enabled in the policy file
  • User interaction (victim views the sanitized output)

Vulnerable vs. Patched Code

Vulnerable Code (AntiSamy < 1.7.5):

// Policy file with preserveComments enabled
<anti-samy>
    <directives>
        <directive name="preserveComments" value="true"/>
    </directives>
</anti-samy>

Patched Code (AntiSamy 1.7.5+):

// The parser now correctly handles comment boundaries
// No specific code change visible; the fix is in the HTML parsing logic

Explanation: The patch modifies the HTML parser to properly handle comment tokens, preventing mutation XSS. The exact code changes are internal to the library.

Exploitation & Lab Setup

Red Team

Proof of Concept (No public exploit available):

<!--[if !IE]><!--><script>alert('XSS')</script><!--<![endif]-->

When processed by vulnerable AntiSamy with preserveComments enabled, the comment may be stripped, but the <script> tag inside could be misinterpreted as active content.

Lab Setup:

  1. Use a Java web application with AntiSamy 1.7.4.
  2. Enable preserveComments in the policy file.
  3. Submit the crafted payload via a form or API.
  4. Observe the sanitized output in a browser.

Blue Team

Detection:

  • Monitor for unusual HTML comment structures in user input.
  • Check for preserveComments being enabled in AntiSamy policy files.
  • Review web application logs for XSS-related alerts.

Mitigation:

  • Upgrade to AntiSamy 1.7.5 or later.
  • Disable preserveComments if not required.
  • Implement Content Security Policy (CSP) headers.

Indicators of Compromise (IOCs)

  • Network: HTTP requests containing nested HTML comments with script tags.
  • File: AntiSamy policy files with <directive name="preserveComments" value="true"/>.
  • Logs: Application logs showing sanitized output with unexpected script execution.

Detection Engineering

YARA Rule

rule CVE_2024_23635_AntiSamy_mXSS {
    meta:
        description = "Detects AntiSamy policy files with preserveComments enabled"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-23635"
    strings:
        $policy = "preserveComments" nocase
        $value = "true" nocase
    condition:
        $policy and $value
}

Sigma Rule

title: AntiSamy mXSS Vulnerability - preserveComments Enabled
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects AntiSamy policy files with preserveComments enabled, indicating potential CVE-2024-23635 exploitation.
author: Valters IT
date: 2024/01/01
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2024-23635
logsource:
    category: file_event
    product: windows
detection:
    selection:
        TargetFilename|contains: 'antisamy'
        TargetFilename|endswith: '.xml'
        Details|contains: 'preserveComments'
    condition: selection
falsepositives:
    - Legitimate use of preserveComments
level: medium

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-23635 AntiSamy mXSS Attempt"; flow:to_server; content:"<!--"; content:"<script"; within:100; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate:

  • Upgrade AntiSamy to version 1.7.5 or later.
  • Disable preserveComments in the policy file if not required.

Long-term:

  • Implement Content Security Policy (CSP) headers.
  • Regularly update dependencies.
  • Conduct security reviews of HTML sanitization logic.

Patch Details: Upgrade to AntiSamy 1.7.5 from Maven Central.


Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-23635/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.