ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass
Summary
| CVE | CVE-2026-104259 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-09 22:18:22 UTC |
| Updated | 2026-11-10 19:17:41 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 5.4 MEDIUM from [email protected]
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
EPSS: 0.002230000 probability, percentile 0.129620000 (date 2026-11-10)
Problem Types: CWE-670 | CWE-670 CWE-670: Always-Incorrect Control Flow Implementation
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 5.4 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
| 3.1 | CNA | DECLARED | 5.4 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
NoneUser Interaction
NoneScope
ChangedConfidentiality
LowIntegrity
LowAvailability
NoneCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Owasp-modsecurity | ModSecurity | affected < 2.9.15 | Not specified |
| CNA | Owasp-modsecurity | ModSecurity | affected >= 3.0.0, < 3.0.17 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/owasp-modsecurity/ModSecurity/releases/tag/v3.0.17 | [email protected] | github.com | |
| github.com/owasp-modsecurity/ModSecurity/releases/tag/v2.9.15 | [email protected] | github.com | |
| github.com/owasp-modsecurity/ModSecurity/security/advisories/GHSA-qrch-p... | [email protected] | github.com | |
| github.com/owasp-modsecurity/ModSecurity/commit/264f348ae1823cb71cead365... | [email protected] | github.com | |
| github.com/owasp-modsecurity/ModSecurity/commit/49a65f471d3130b91f7fff9b... | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.