ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass
- Exploited
- No known exploitation
- Fix
- Fixed in 2.9.15, 3.0.17
- Who is exposed
- Not reported
Do first: Upgrade to a fixed version: 2.9.15, 3.0.17.
- Last modified
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 22/100 · provisional
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
ModSecurity, an open source web application firewall engine used with Apache, IIS, and Nginx, has a flaw in its removeComments transformation that fails to strip adjacent comments. A remote attacker without logging in can use this to bypass WAF rules that depend on comment stripping.
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
Read the original description
ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. Prior to 2.9.15 and 3.0.17, msre_fn_removeComments_execute in apache2/re_tfns.c and inplace() in src/actions/transformations/remove_comments.cc implement t:removeComments by copying the character immediately after a comment terminator without re-evaluating it. Adjacent comments can therefore leave a later comment in the transformed value, allowing inline-comment obfuscation to bypass rules that depend on comment stripping. When a comment terminator is the final content, the same copy reads one byte beyond the input buffer. This issue is fixed in versions 2.9.15 and 3.0.17.
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure17/25No login or user action needed per the CVSS vector, reachable over the network without a login · Unknown: No advisory context yet
- Reach?/20Unknown. No tracked technology or package matched
- Severity5.4/10CVSS 5.4
- No patch0/5No signal
What would change the score
- Would score about 67 if added to CISA KEV
- Would score about 62 if CISA's SSVC rates exploitation active
- Would score about 27 if advisories confirm default setups are exposed
What to do
Upgrade to a fixed version: 2.9.15, 3.0.17.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- owasp-modsecurity ModSecurity
fixed in 2.9.15; From 3.0.0 · fixed in 3.0.17
Evidence 5
- Advisory
- Repository
- Repository
- Repository
- Repository
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-104259
Is CVE-2026-104259 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data
Which versions are affected by CVE-2026-104259?
ModSecurity: before 2.9.15; from 3.0.0 before 3.0.17.Source: cve.now feed data
How do I fix CVE-2026-104259?
Upgrade to a fixed version: 2.9.15, 3.0.17.Source: cve.now feed data