CVE-2026-104259ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling…
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.
What to do
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | modsecurity | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 26.10 | modsecurity-apache | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 26.04 | modsecurity | Under investigation | UBUNTU-CVE-2026-104259 | |
| Ubuntu 26.04 | modsecurity-apache | Under investigation | UBUNTU-CVE-2026-104259 | |
| Ubuntu 24.04 | modsecurity | Under investigation | UBUNTU-CVE-2026-104259 | |
| Ubuntu 24.04 | modsecurity-apache | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 22.04 | modsecurity | Under investigation | UBUNTU-CVE-2026-104259 | |
| Ubuntu 22.04 | modsecurity-apache | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 20.04 | modsecurity | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 20.04 | modsecurity-apache | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 18.04 | modsecurity-apache | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 16.04 | modsecurity-apache | Fix pending | UBUNTU-CVE-2026-104259 | |
| Ubuntu 14.04 | modsecurity-apache | Fix pending | UBUNTU-CVE-2026-104259 | |
| Debian 14 | modsecurity | Fix pending | DEBIAN-CVE-2026-104259 | |
| Debian 14 | modsecurity-apache | Fix pending | DEBIAN-CVE-2026-104259 | |
| Debian 13 | modsecurity | Fix pending | DEBIAN-CVE-2026-104259 | |
| Debian 13 | modsecurity-apache | Fix pending | DEBIAN-CVE-2026-104259 | |
| Debian 12 | modsecurity | Fix pending | DEBIAN-CVE-2026-104259 | |
| Debian 12 | modsecurity-apache | Fix pending | DEBIAN-CVE-2026-104259 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- owasp-modsecurity ModSecurity: affected: < 2.9.15, >= 3.0.0, < 3.0.17
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.