
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-104259 is a WAF rule bypass vulnerability in ModSecurity, an open-source web application firewall engine for Apache, IIS, and Nginx. The flaw exists in the t:removeComments transformation, which fails to correctly strip adjacent inline comments, allowing attackers to obfuscate SQLi/XSS payloads and bypass WAF detection rules. Affected versions are ModSecurity v2 prior to 2.9.15 and ModSecurity v3 from 3.0.0 up to (but not including) 3.0.17. The vulnerability was published on November 9, 2026, and carries a CVSS v3.1 base score of 5.4 (Medium) (GitHub Advisory).
The root cause is an always-incorrect control flow implementation (CWE-670) in both msre_fn_removeComments_execute in apache2/re_tfns.c (v2) and inplace() in src/actions/transformations/remove_comments.cc (v3). When a comment terminator (*/ or -->) is encountered, the code advances the index past the terminator and immediately copies the next character to the output buffer without re-evaluating it as a potential new comment start. This means adjacent comments like /*A*//*B*/ are not fully stripped — the second comment leaks through as /*B*/. Additionally, when a comment closer is the last content in the input, the same copy operation reads one byte beyond the end of the input buffer, constituting an out-of-bounds read. The fix removes the premature character copy, allowing the main loop to re-evaluate the position on its next iteration (GitHub Advisory, v3 Fix Commit, v2 Fix Commit).
The primary impact is a WAF rule bypass: attackers can craft payloads using adjacent inline comments (e.g., /**/UNION/**/SELECT/**/) that survive the t:removeComments transformation and reach downstream rule matching or the backend application unmodified, enabling SQLi or XSS attacks that would otherwise be blocked. A secondary impact is an out-of-bounds read when a comment closer is the final content in the input buffer, which could potentially be leveraged for information disclosure or instability. The confidentiality and integrity impacts are rated Low, and there is no direct availability impact (GitHub Advisory).
No public proof-of-concept exploit code or in-the-wild exploitation has been reported as of the publication date. The NVD SSVC assessment classifies exploitation as "none" and the vulnerability as not automatable, reflecting the requirement for high attack complexity. The EPSS score is approximately 0.0022 (0.22%), indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog (GitHub Advisory).
t:removeComments transformation (e.g., OWASP CRS rules targeting SQLi or XSS).UNION/**//**/SELECT for SQL injection or <scr/**//**/ipt> for XSS. The adjacent comments cause the second comment to survive stripping.GET /index.php?q=UNION%2F%2A%2A%2F%2F%2A%2A%2FSELECT.t:removeComments transformation strips only the first comment, leaving the second intact. The transformed value (e.g., UNION/**/SELECT) does not match the WAF's detection pattern for UNIONSELECT, so the rule is not triggered./**//**/, UNION/**//**/SELECT, or <!--...--><!--...--> sequences targeting endpoints protected by ModSecurity.t:removeComments transformation debug log entries stripping all comments.Upgrade ModSecurity to the patched versions: v2.9.15 or v3.0.17, both released on September 29, 2026. These releases remove the premature character copy after comment terminators, ensuring adjacent comments are fully stripped and eliminating the out-of-bounds read. No configuration-based workaround is available; upgrading is the only reliable remediation. Organizations using OWASP CRS rules that rely on t:removeComments should prioritize this update (v2.9.15 Release, v3.0.17 Release).
The vulnerability was discovered and reported by researcher HEXER365 and coordinated through the ModSecurity private security repository before public disclosure via GitHub Security Advisory GHSA-qrch-pjfr-9g47. The fix was developed by maintainer airween. No significant broader media coverage or notable social media discussion has been identified beyond standard CVE tracking and aggregator sites (GitHub Advisory).
Fix availability across major Linux distributions and their releases.
bookworm
modsecurity-apache
sid
modsecurity-apache
trixie
modsecurity-apache
bionic (esm-apps)
modsecurity-apache
devel
modsecurity
focal (esm-apps)
modsecurity
jammy
modsecurity
jammy (esm-apps)
modsecurity
noble
modsecurity
noble (esm-apps)
modsecurity
resolute
modsecurity
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."