CVE-2026-104259
CVE-2026-104259 · ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass
CVSS 5.4 · Medium · EPSS 0.3%
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- modsecurityNo fix published
- modsecurity Debian 12No fix published
- modsecurity Debian 13No fix published
- modsecurity Debian 14No fix published
- and 16 more
Check the installed version:
dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="modsecurity"'Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Stack: system
Affected products and versions
modsecurity
- Versions
- < 2.9.15: Affected
- >= 3.0.0, < 3.0.17: Affected
No fix published
modsecurity Debian 12
- Versions
- 3.0.10-1
- 3.0.11-1
- 3.0.12-1
- 3.0.12-1.1
- 3.0.12-1.1~exp1
- 3.0.13-1
All versions (12)
- 3.0.14-1
- 3.0.15-1
- 3.0.16-1
- 3.0.9-1
- 3.0.9-1+deb12u1
- 3.0.9-1+deb12u2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity Debian 13
- Versions
- 3.0.14-1
- 3.0.14-1+deb13u1
- 3.0.14-1+deb13u2
- 3.0.15-1
- 3.0.16-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity Debian 14
- Versions
- 3.0.14-1
- 3.0.15-1
- 3.0.16-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Debian 12
- Versions
- 2.9.10-1
- 2.9.11-1
- 2.9.12-2
- 2.9.13-1
- 2.9.7-1
- 2.9.7-1+deb12u1
All versions (10)
- 2.9.7-1+deb12u2
- 2.9.8-1
- 2.9.8-1.1
- 2.9.9-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Debian 13
- Versions
- 2.9.11-1
- 2.9.11-1+deb13u1
- 2.9.12-2
- 2.9.13-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Debian 14
- Versions
- 2.9.11-1
- 2.9.12-2
- 2.9.13-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu Pro 14.04 LTS
- Versions
- 2.7.4-1
- 2.7.5-1
- 2.7.7-1
- 2.7.7-1ubuntu1
- 2.7.7-2
- 2.7.7-2ubuntu0.1~esm1
All versions (7)
- 2.7.7-2ubuntu0.1~esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu Pro 16.04 LTS
- Versions
- 2.9.0-1
- 2.9.0-1ubuntu0.1~esm1
- 2.9.0-1ubuntu0.1~esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu Pro 18.04 LTS
- Versions
- 2.9.1-3
- 2.9.2-1
- 2.9.2-1ubuntu0.1~esm1
- 2.9.2-1ubuntu0.1~esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity Ubuntu 20.04 LTS
- Versions
- 3.0.3-1
- 3.0.4-1
- 3.0.4-1build1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu Pro 20.04 LTS
- Versions
- 2.9.3-1
- 2.9.3-1ubuntu0.1
- 2.9.3-1ubuntu0.1+esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity Ubuntu 22.04 LTS
- Versions
- 3.0.4-2
- 3.0.6-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu Pro 22.04 LTS
- Versions
- 2.9.3-3
- 2.9.5-1
- 2.9.5-1ubuntu0.1~esm1
- 2.9.5-1ubuntu0.1~esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity Ubuntu 24.04 LTS
- Versions
- 3.0.10-1
- 3.0.11-1
- 3.0.12-1
- 3.0.12-1.1build1
- 3.0.12-1.1build2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu Pro 24.04 LTS
- Versions
- 2.9.7-1
- 2.9.7-1build2
- 2.9.7-1build3
- 2.9.7-1ubuntu0.24.04.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity Ubuntu 26.10
- Versions
- 3.0.14-1build2
- 3.0.15-1
- 3.0.16-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu 26.10
- Versions
- 2.9.12-2build1
- 2.9.13-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity Ubuntu 26.04 LTS
- Versions
- 3.0.14-1build1
- 3.0.14-1build2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
modsecurity-apache Ubuntu 26.04 LTS
- Versions
- 2.9.12-2
- 2.9.12-2build1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
Original sources
- 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
- https://nvd.nist.gov/vuln/detail/CVE-2026-104259