CVE-2026-104259

Source
https://cve.org/CVERecord?id=CVE-2026-104259
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-104259.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-104259
Aliases
Downstream
Published
2026-11-09T21:37:00Z
Modified
2026-11-27T06:56:06Z
Severity
  • 5.4 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N CVSS Calculator
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.

Database specific
{
    "cna_assigner":  "GitHub_M",
    "cwe_ids":  [
        "CWE-670"
    ],
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/104xxx/CVE-2026-104259.json"
}
References

Affected packages

Git / github.com/owasp-modsecurity/modsecurity

Affected ranges

Type
GIT
Repo
https://github.com/owasp-modsecurity/modsecurity
Events
Database specific
Show details
{
    "extracted_events":  [
        {
            "range":  [
                {
                    "introduced":  "0"
                },
                {
                    "fixed":  "2.9.15"
                }
            ],
            "source":  "AFFECTED_FIELD",
            "strategy":  "StringRangeExpression"
        },
        {
            "range":  [
                {
                    "introduced":  "3.0.0"
                },
                {
                    "fixed":  "3.0.17"
                }
            ],
            "source":  "AFFECTED_FIELD",
            "strategy":  "StringRangeExpression"
        },
        {
            "range":  [
                {
                    "fixed":  "264f348ae1823cb71cead3650b74c165678a1d46"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        },
        {
            "range":  [
                {
                    "fixed":  "49a65f471d3130b91f7fff9bfac9fe8dd9b97c44"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        },
        {
            "original_tag":  "v2.9.15",
            "range":  [
                {
                    "fixed":  "151074aca78a416764b12ba1221e61a17a6c714d"
                }
            ],
            "source":  "REFERENCES_TAG"
        },
        {
            "original_tag":  "v3.0.17",
            "range":  [
                {
                    "fixed":  "1925753989ccce977cdaae417b55c9726c7cf02c"
                }
            ],
            "source":  "REFERENCES_TAG"
        }
    ]
}

Affected versions

v2.*
v2.7.4
v2.9.0
v2.9.0-rc1
v2.9.0-rc2
v2.9.1
v2.9.1-rc1
v2.9.10
v2.9.11
v2.9.12
v2.9.13
v2.9.14
v2.9.2
v2.9.3
v2.9.4
v2.9.5
v2.9.6
v2.9.7
v2.9.9
v3.*
v3.0.0
v3.0.1
v3.0.10
v3.0.11
v3.0.12
v3.0.13
v3.0.14
v3.0.15
v3.0.16
v3.0.2
v3.0.3
v3.0.4
v3.0.5
v3.0.6
v3.0.7
v3.0.8
v3.0.9

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-104259.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "202122836514193154345534637951501939605",
                "133104122808785052517467047972153404933",
                "18403014409354985176589860182163824485",
                "80390221611433042655094454244737484174",
                "31701643716507315984075794353236711796",
                "252111886007404248291986472810814348762",
                "74580135900238923667206134302524463627",
                "18890313154030873173129351316815346599",
                "318089468848531841346110930657317614656",
                "101840384259278922854582896702006291992",
                "129021293761078989391968731218227673602",
                "12585583621743588204736953142967562201",
                "128304307327763600117827817291712775520",
                "88879764568889400471042244569249161496"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2026-104259-5613b812",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/owasp-modsecurity/modsecurity/commit/49a65f471d3130b91f7fff9bfac9fe8dd9b97c44",
        "target":  {
            "file":  "src/actions/transformations/remove_comments.cc"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "196852077556833942779629326418321491269",
            "length":  1347
        },
        "id":  "CVE-2026-104259-5dd3964b",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/owasp-modsecurity/modsecurity/commit/49a65f471d3130b91f7fff9bfac9fe8dd9b97c44",
        "target":  {
            "file":  "src/actions/transformations/remove_comments.cc",
            "function":  "inplace"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "75387750628947182766104478398153436443",
                "328510958205499367754439006306049933219",
                "18403014409354985176589860182163824485",
                "178675538285570150774987523825907851134",
                "50307940690726875897152364288359233798",
                "15602561772537390961120552489857131856",
                "53338939089708413140182333335245774420",
                "334661620442043208677271398900175401732",
                "97246155580574071342188854289417805778",
                "129021293761078989391968731218227673602",
                "12585583621743588204736953142967562201",
                "128304307327763600117827817291712775520",
                "88879764568889400471042244569249161496"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2026-104259-97730e8d",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/owasp-modsecurity/modsecurity/commit/264f348ae1823cb71cead3650b74c165678a1d46",
        "target":  {
            "file":  "apache2/re_tfns.c"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "67850261134852653930510267943829640721",
            "length":  1413
        },
        "id":  "CVE-2026-104259-e054c58b",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/owasp-modsecurity/modsecurity/commit/264f348ae1823cb71cead3650b74c165678a1d46",
        "target":  {
            "file":  "apache2/re_tfns.c",
            "function":  "msre_fn_removeComments_execute"
        }
    }
]
vanir_signatures_modified
"2026-11-14T07:06:32Z"