# CVE-2026-104259: ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-01)
- Published: 2026-11-09T21:37:00.048Z
- Modified: 2026-11-27T06:45:33.825Z
- Also known as: BIT-MODSECURITY-2026-104259, BIT-MODSECURITY2-2026-104259
- Weaknesses: CWE-670
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- owasp-modsecurity ModSecurity: < 2.9.15; >= 3.0.0, < 3.0.17
- modsecurity (Bitnami): before 2.9.15; from 3.0.0 before 3.0.17
- modsecurity2 (Bitnami): before 2.9.15; from 3.0.0 before 3.0.17

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/owasp-modsecurity/ModSecurity/security/advisories/GHSA-qrch-pjfr-9g47> (web)
- <https://github.com/owasp-modsecurity/ModSecurity/commit/264f348ae1823cb71cead3650b74c165678a1d46> (web)
- <https://github.com/owasp-modsecurity/ModSecurity/commit/49a65f471d3130b91f7fff9bfac9fe8dd9b97c44> (web)
- <https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v2.9.15> (web)
- <https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v3.0.17> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-104259> (web)

## Sources

- CVE List: [CVE-2026-104259](https://www.cve.org/CVERecord?id=CVE-2026-104259), CVE Terms of Use, modified 2026-11-10
- NVD: [CVE-2026-104259](https://nvd.nist.gov/vuln/detail/CVE-2026-104259), Public domain, modified 2026-11-12
- Bitnami Vulnerability Database: [BIT-MODSECURITY-2026-104259](https://osv.dev/vulnerability/BIT-MODSECURITY-2026-104259), Apache-2.0, modified 2026-11-27
- Bitnami Vulnerability Database: [BIT-MODSECURITY2-2026-104259](https://osv.dev/vulnerability/BIT-MODSECURITY2-2026-104259), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-104259 · Whole record: https://cve.day/CVE-2026-104259.json · Rebuilt by cve.day 2026-11-27T07:07:29.961Z
