Servers and applications
CVE-2026-104259
removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass
- Severity
- Medium 5.4
- Published
- 30 Sept 2026
- Last changed
- 10 Nov 2026
- Added to UpHeron
- 3 Nov 2026
- Fixed in
- 2.9.15, 3.0.17
- Exploit chance
- 0.2% in the next 30 daysHigher than 13% of CVEs. EPSS by FIRST, 19 Nov 2026
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read some data · Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N- Also known as
- GHSA-qrch-pjfr-9g47
- Sources
- CVE Program, Project advisories (GitHub)
Description
inplace() in src/actions/transformations/remove_comments.cc fails to remove a second comment immediately adjacent to a first, allowing SQLi/XSS payloads using inline-comment obfuscation (e.g. //UNION//SELECT/**/) to survive t:removeComments and reach downstream rule matching or the application unmodified.
When one comment closes, the character immediately following */ is copied to output literally instead of being re-evaluated as the possible start of a new comment (/).
The same input[j] = input[i] also reads one byte past the end of the buffer when the comment closer is the last content in the input: i += 2 (or i += 3 for the --> closer) can make i == input_len before that read. apache2/re_tfns.c's msre_fn_removeComments_execute has the identical pattern.
- WAF rule bypass (CWE-670): attackers using t:removeComments in bypass payloads like //UNION//SELECT/**/ can defeat comment-stripping-dependent detection rules.
Affected software
| Software | Affected versions |
|---|---|
ModSecurityServers and applications · cna:owasp-modsecurity|modsecurity |
|
ModSecurityServers and applications · github:owasp-modsecurity/modsecurity |
|
About ModSecurity
web application firewall (WAF) module
- Docker Hub pulls
- 7,086,565Docker Hub, 15 Nov 2026
- GitHub stars
- 9,872GitHub, 15 Nov 2026
- Forks
- 1,761GitHub, 15 Nov 2026
- Latest release
- v3.0.17GitHub, 15 Nov 2026
- Released
- 29 Sept 2026GitHub
- Developer
- Trustwave HoldingsWikidata
- License
- Apache Software License 2.0Wikidata
- Written in
- CWikidata
- First published on GitHub
- 2 Feb 2011GitHub
Website Source code Docker image
Vulnerabilities in ModSecurity
- In our list
- 36
- Published in the last 12 months
- 12
- Critical, last 12 months
- 0
- High, last 12 months
- 6
- Known exploited
- 0
- CVE-2026-61813ModSecurity: Incorrect libcurl TLS hostname verification setting in HttpsClient::downloadLow 3.7 5 Nov 2026
- CVE-2026-104269RFC 2231 `filename*` Parameter Bypasses Multipart Filename Rules on RFC-Compliant Backends (Go, Python, Node, Java)High 8.6 30 Sept 2026
- GHSA-4j47-8qcr-jf59`t:base64DecodeExt` silently discards the entire decoded value on a malformed base64 padding group, bypassing rule matchingMedium 5.8 30 Sept 2026
- CVE-2026-103932PCRE2 `@rxGlobal` match-limit errors are converted to no-matchMedium 5.8 30 Sept 2026
- CVE-2026-73857ModSecurity v3 XML Request Body Processor Uninitialized Pointer Dereference VulnerabilityHigh 7.5 30 Sept 2026
- CVE-2026-73856Response Body Inspection BypassHigh 8.6 30 Sept 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-104259
- GitHub Advisory Database https://github.com/advisories/GHSA-qrch-pjfr-9g47
- github.com https://github.com/owasp-modsecurity/ModSecurity/security/advisories/GHSA-qrch-pjfr-9g47