{"id":"BIT-modsecurity-2026-104259","summary":"ModSecurity: removeComments Transformation Fails to Strip Adjacent Comments, Enabling WAF Rule Bypass","details":"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.","aliases":["BIT-modsecurity2-2026-104259","CVE-2026-104259","GHSA-qrch-pjfr-9g47"],"modified":"2026-11-27T06:56:06.684707142Z","published":"2026-11-27T05:47:09.047Z","database_specific":{"severity":"Medium","cpes":["cpe:2.3:a:trustwave:modsecurity:*:*:*:*:*:*:*:*"]},"references":[{"type":"WEB","url":"https://github.com/owasp-modsecurity/ModSecurity/commit/264f348ae1823cb71cead3650b74c165678a1d46"},{"type":"WEB","url":"https://github.com/owasp-modsecurity/ModSecurity/commit/49a65f471d3130b91f7fff9bfac9fe8dd9b97c44"},{"type":"WEB","url":"https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v2.9.15"},{"type":"WEB","url":"https://github.com/owasp-modsecurity/ModSecurity/releases/tag/v3.0.17"},{"type":"WEB","url":"https://github.com/owasp-modsecurity/ModSecurity/security/advisories/GHSA-qrch-pjfr-9g47"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-104259"}],"affected":[{"package":{"name":"modsecurity","ecosystem":"Bitnami","purl":"pkg:bitnami/modsecurity"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.9.15"},{"introduced":"3.0.0"},{"fixed":"3.0.17"}]}],"database_specific":{"source":"https://github.com/bitnami/vulndb/tree/main/data/modsecurity/BIT-modsecurity-2026-104259.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N"}]}],"schema_version":"1.9.2"}