CVE-2026-104259 ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: partial
- Technology
- NginxUbuntuDebianNetwork Appliances
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.
Upgrade path
15 packages: 0 fixed, 14 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/modsecurity(Debian 12) | = 3.0.9-1; = 3.0.9-1+deb12u1; = 3.0.9-1+deb12u2; = 3.0.10-1 +9 more | No fix listed | No fix yet |
| debian/modsecurity(Debian 13) | = 3.0.14-1; = 3.0.14-1+deb13u1; = 3.0.14-1+deb13u2; = 3.0.15-1 +2 more | No fix listed | No fix yet |
| debian/modsecurity(Debian 14) | = 3.0.14-1; = 3.0.15-1; = 3.0.16-1; All versions | No fix listed | No fix yet |
| debian/modsecurity-apache(Debian 12) | = 2.9.7-1; = 2.9.7-1+deb12u1; = 2.9.7-1+deb12u2; = 2.9.8-1 +7 more | No fix listed | No fix yet |
| debian/modsecurity-apache(Debian 13) | = 2.9.11-1; = 2.9.11-1+deb13u1; = 2.9.12-2; = 2.9.13-1 +1 more | No fix listed | No fix yet |
| debian/modsecurity-apache(Debian 14) | = 2.9.11-1; = 2.9.12-2; = 2.9.13-1; All versions | No fix listed | No fix yet |
| ubuntu/modsecurity(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/modsecurity(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/modsecurity(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/modsecurity(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| ubuntu/modsecurity-apache(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/modsecurity-apache(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/modsecurity-apache(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/modsecurity-apache(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| owasp-modsecurity ModSecurity | = < 2.9.15; = >= 3.0.0, < 3.0.17 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| owasp-modsecurity ModSecurity | = < 2.9.15 | No fix listed |
| owasp-modsecurity ModSecurity | = >= 3.0.0, < 3.0.17 | No fix listed |
| debian/modsecurity(Debian:12) | All versions | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.10-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.11-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.12-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.12-1.1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.12-1.1~exp1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.13-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.14-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.15-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.16-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.9-1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.9-1+deb12u1 | No fix listed |
| debian/modsecurity(Debian:12) | = 3.0.9-1+deb12u2 | No fix listed |
| debian/modsecurity(Debian:13) | All versions | No fix listed |
| debian/modsecurity(Debian:13) | = 3.0.14-1 | No fix listed |
| debian/modsecurity(Debian:13) | = 3.0.14-1+deb13u1 | No fix listed |
| debian/modsecurity(Debian:13) | = 3.0.14-1+deb13u2 | No fix listed |
| debian/modsecurity(Debian:13) | = 3.0.15-1 | No fix listed |
| debian/modsecurity(Debian:13) | = 3.0.16-1 | No fix listed |
| debian/modsecurity(Debian:14) | All versions | No fix listed |
| debian/modsecurity(Debian:14) | = 3.0.14-1 | No fix listed |
| debian/modsecurity(Debian:14) | = 3.0.15-1 | No fix listed |
| debian/modsecurity(Debian:14) | = 3.0.16-1 | No fix listed |
Show 28 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/modsecurity-apache(Debian:12) | All versions | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.10-1 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.11-1 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.12-2 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.13-1 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.7-1 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.7-1+deb12u1 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.7-1+deb12u2 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.8-1 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.8-1.1 | No fix listed |
| debian/modsecurity-apache(Debian:12) | = 2.9.9-1 | No fix listed |
| debian/modsecurity-apache(Debian:13) | All versions | No fix listed |
| debian/modsecurity-apache(Debian:13) | = 2.9.11-1 | No fix listed |
| debian/modsecurity-apache(Debian:13) | = 2.9.11-1+deb13u1 | No fix listed |
| debian/modsecurity-apache(Debian:13) | = 2.9.12-2 | No fix listed |
| debian/modsecurity-apache(Debian:13) | = 2.9.13-1 | No fix listed |
| debian/modsecurity-apache(Debian:14) | All versions | No fix listed |
| debian/modsecurity-apache(Debian:14) | = 2.9.11-1 | No fix listed |
| debian/modsecurity-apache(Debian:14) | = 2.9.12-2 | No fix listed |
| debian/modsecurity-apache(Debian:14) | = 2.9.13-1 | No fix listed |
| ubuntu/modsecurity(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/modsecurity-apache(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/modsecurity(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/modsecurity-apache(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/modsecurity(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/modsecurity-apache(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/modsecurity(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/modsecurity-apache(Ubuntu:26.10) | All versions | No fix listed |
References
- 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
- Debian Security Tracker CVE-2026-104259 vendor-advisory
- bugs.debian.org issue-tracking
- bugs.debian.org issue-tracking
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- ENISA EUVD EUVD-2026-120509 third-party-advisory