Read the docs

removeComments transformation in ModSecurity fails to strip adjacent comments

Priority LOW 24CWE-670Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA.

Summary

ModSecurity versions before 2.9.15 and from 3.0.0 before 3.0.17 are affected. The t:removeComments transformation copies the character right after a comment terminator without checking it again, so adjacent comments can leave a later comment in the transformed value (CWE-670). A remote attacker can use inline comment obfuscation to bypass WAF rules that depend on comment stripping, and the same flaw can read one byte beyond the input buffer when a comment terminator ends the input.

Written with Claude Haiku 5.5 from the sources below · 2026-11-09

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00223 12th percentileScored 2026-11-16
Fix Fixed ModSecurity (owasp-modsecurity): 2.9.15, 3.0.17

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
owasp-modsecurityModSecuritybefore 2.9.15; 3.0.0 to before 3.0.172.9.15, 3.0.17Patch availableCNA
  • ModSecurity Vendorowasp-modsecurity Affected before 2.9.15; 3.0.0 to before 3.0.17 Fixed in 2.9.15, 3.0.17 Patch available CNA

Remediation

Upgrade ModSecurity to version 2.9.15 or 3.0.17.

Written with Claude Haiku 5.5 from the sources below · 2026-11-09

  • Fix · CNA ModSecurity (owasp-modsecurity) Fixed in 2.9.15, 3.0.17

Timeline

  1. 2026-11-09 Threatist record created from CVE-2026-104259
  2. 2026-11-10 CISA SSVC decision points changed
  3. 2026-11-10 Priority changed: MEDIUM → LOW

References

  • TI-2026-85491 ModSecurity filename* parsing lets uploads bypass multipart rules CVSS 3.1HIGH 8.6
  • TI-2026-85489 ModSecurity skips response body inspection for mixed-case types CVSS 3.1HIGH 8.6
  • TI-2026-37865 ModSecurity: Multipart form-data parser silently strips embedded line breaks from… CVSS 3.1HIGH 8.6
  • TI-2025-40548 FACTION Unauthenticated Custom Extension Upload leads to RCE CVSS 3.1CRITICAL 9.8
  • TI-2022-07517 Path Traversal in ESAPI CVSS 3.1CRITICAL 9.8
  • TI-2026-30581 ModSecurity: Unsigned integer underflow in @verifySSN / @verifyCPF / @verifySVNR operators CVSS 4.0HIGH 8.2
See all 59 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences