removeComments transformation in ModSecurity fails to strip adjacent comments
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| owasp-modsecurity | ModSecurity | before 2.9.15; 3.0.0 to before 3.0.17 | 2.9.15, 3.0.17 | Patch available | CNA |
- 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
- 2026-11-09 Threatist record created from CVE-2026-104259
- 2026-11-10 CISA SSVC decision points changed
- 2026-11-10 Priority changed: MEDIUM → LOW
References
Other 5
- https://github.com/owasp-modsecurity/ModSecurity/security/advisories/GHSA-qrch-pjfr-9g47
- https://github.com/owasp-modsecurity/ModSecurity/commit/264f348ae1823cb71cead3650b74c165678a1d46
- https://github.com/owasp-modsecurity/ModSecurity/commit/49a65f471d3130b91f7fff9bfac9fe8dd9b97c44
- https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v2.9.15
- https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v3.0.17
More owasp-modsecurity vulnerabilities
- 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
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences