Skip to content
Heist/ feed
Back to feed
MediumFix available

Coraza has Cookie Parser Confusion

Type: advisorySources: OSV2 source records

## Summary Coraza's cookie parser (`internal/cookies.ParseCookies`) does not strip ASCII control characters (CTLs) from the edges of a cookie name/value before they're matched against `REQUEST_COOKIES` / `REQUEST_COOKIES_NAMES`. When a CTL sits directly next to the `=` separator, Coraza absorbs it into the adjacent name or value, while several backend cookie parsers trim it away — so the WAF and the application disagree about the cookie it just received. ## Root cause - `ParseCookies` (`internal/cookies/cookies.go:17,26,31`) trims via `net/textproto.TrimString`, which strips only space (`0x20`) and tab (`0x09`). - RFC 6265 §4.1.1 defines cookie `name` as an HTTP `token` and `value` as `cookie-octet`, both excluding the full C0 control range (`0x00–0x1F`, `0x7F`) — not just space/tab. - Input `a\v=\t'` (vertical tab `\v` next to `=`) keeps `\v` in the name (`a\v`), yielding name=`a\v`, value=`\t'`. ## Confirmed divergence from real backends | Implementation | Name | Value | |---|---|---| | Coraza (< 3.8.0) | `a\v` | `\t'` | | Python `http.cookies`, and the Werkzeug/Flask version in the report below | `a` | `'` | | PHP `$_COOKIE` | `a` | `\t'` | | Node.js `cookie` package | `a\v` | `'` | RFC 6265 itself calls this exact cookie-pair invalid, so there's no single spec-correct reference — but Coraza's boundary handling diverges from 2 of these 3 widely-used backends. Correction (2026-10-02): current Werkzeug (3.1.9, checked during review of the 3.8.1 follow-up) keeps `a\v` as the

Products
github.com/corazawaf/coraza, github.com/corazawaf/coraza/v2, github.com/corazawaf/coraza/v3
Affected versions
Not specified
Fixed versions
3.8.1
CVEs
CVE-2026-107835
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 08:44 UTC · Revision 2

Source evidence

Coraza has Cookie Parser Confusion

core-osv · Original source

Published 8 Oct 2026, 17:51 UTC

## Summary Coraza's cookie parser (`internal/cookies.ParseCookies`) does not strip ASCII control characters (CTLs) from the edges of a cookie name/value before they're matched against `REQUEST_COOKIES` / `REQUEST_COOKIES_NAMES`. When a CTL sits directly next to the `=` separator, Coraza absorbs it into the adjacent name or value, while several backend cookie parsers trim it away — so the WAF and the application disagree about the cookie it just received. ## Root cause - `ParseCookies` (`internal/cookies/cookies.go:17,26,31`) trims via `net/textproto.TrimString`, which strips only space (`0x20`) and tab (`0x09`). - RFC 6265 §4.1.1 defines cookie `name` as an HTTP `token` and `value` as `cookie-octet`, both excluding the full C0 control range (`0x00–0x1F`, `0x7F`) — not just space/tab. - Input `a\v=\t'` (vertical tab `\v` next to `=`) keeps `\v` in the name (`a\v`), yielding name=`a\v`, value=`\t'`. ## Confirmed divergence from real backends | Implementation | Name | Value | |---|---|---| | Coraza (< 3.8.0) | `a\v` | `\t'` | | Python `http.cookies`, and the Werkzeug/Flask version in the report below | `a` | `'` | | PHP `$_COOKIE` | `a` | `\t'` | | Node.js `cookie` package | `a\v` | `'` | RFC 6265 itself calls this exact cookie-pair invalid, so there's no single spec-correct reference — but Coraza's boundary handling diverges from 2 of these 3 widely-used backends. Correction (2026-10-02): current Werkzeug (3.1.9, checked during review of the 3.8.1 follow-up) keeps `a\v` as the

osv:GHSA-g4qm-m288-5cp9

github.com/corazawaf/coraza/v3

Fixed versions: 3.8.1

Complete source record
{
  "id": "6844fd7901a364521c7d02ee32e99f8f5490e7fdf938205e0c73dc84b49e6d31",
  "url": "https://osv.dev/vulnerability/GHSA-g4qm-m288-5cp9",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Coraza has Cookie Parser Confusion",
    "summary": "## Summary Coraza's cookie parser (`internal/cookies.ParseCookies`) does not strip ASCII control characters (CTLs) from the edges of a cookie name/value before they're matched against `REQUEST_COOKIES` / `REQUEST_COOKIES_NAMES`. When a CTL sits directly next to the `=` separator, Coraza absorbs it into the adjacent name or value, while several backend cookie parsers trim it away — so the WAF and the application disagree about the cookie it just received. ## Root cause - `ParseCookies` (`internal/cookies/cookies.go:17,26,31`) trims via `net/textproto.TrimString`, which strips only space (`0x20`) and tab (`0x09`). - RFC 6265 §4.1.1 defines cookie `name` as an HTTP `token` and `value` as `cookie-octet`, both excluding the full C0 control range (`0x00–0x1F`, `0x7F`) — not just space/tab. - Input `a\\v=\\t'` (vertical tab `\\v` next to `=`) keeps `\\v` in the name (`a\\v`), yielding name=`a\\v`, value=`\\t'`. ## Confirmed divergence from real backends | Implementation | Name | Value | |---|---|---| | Coraza (< 3.8.0) | `a\\v` | `\\t'` | | Python `http.cookies`, and the Werkzeug/Flask version in the report below | `a` | `'` | | PHP `$_COOKIE` | `a` | `\\t'` | | Node.js `cookie` package | `a\\v` | `'` | RFC 6265 itself calls this exact cookie-pair invalid, so there's no single spec-correct reference — but Coraza's boundary handling diverges from 2 of these 3 widely-used backends. Correction (2026-10-02): current Werkzeug (3.1.9, checked during review of the 3.8.1 follow-up) keeps `a\\v` as the ",
    "evidence": "osv:GHSA-g4qm-m288-5cp9",
    "products": [
      {
        "name": {
          "value": "github.com/corazawaf/coraza/v3",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.8.1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-g4qm-m288-5cp9",
      "aliases": [
        "CVE-2026-107835",
        "GHSA-g4qm-m288-5cp9",
        "GO-2026-6694"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.8.1"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/corazawaf/coraza/v3",
            "purl": "pkg:golang/github.com/corazawaf/coraza/v3",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-g4qm-m288-5cp9/GHSA-g4qm-m288-5cp9.json"
          }
        }
      ],
      "modified": "2026-10-19T21:40:49.823376643Z",
      "provider": "osv",
      "references": [
        "https://github.com/corazawaf/coraza/security/advisories/GHSA-g4qm-m288-5cp9",
        "https://github.com/corazawaf/coraza/commit/0b940e197ad9983fb3aa36e84f1f81ff985461af",
        "https://github.com/corazawaf/coraza/commit/9f8521398d1ff023b958fad0b944cac265763866",
        "https://github.com/corazawaf/coraza",
        "https://github.com/corazawaf/coraza/releases/tag/v3.8.1"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-436"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-08T17:51:30Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-107835",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 376741,
  "published_at": "2026-10-08T17:51:30+00:00"
}

Coraza has Cookie Parser Confusion in github.com/corazawaf/coraza

core-osv · Original source

Published 19 Oct 2026, 21:08 UTC

Coraza has Cookie Parser Confusion in github.com/corazawaf/coraza

osv:GO-2026-6694

github.com/corazawaf/coraza

Fixed versions: Not specified

github.com/corazawaf/coraza/v2

Fixed versions: Not specified

github.com/corazawaf/coraza/v3

Fixed versions: 3.8.1

Complete source record
{
  "id": "daa3e92fa06633adaec1f8999828049dcda398fdfdfe51d80c01654319be6396",
  "url": "https://osv.dev/vulnerability/GO-2026-6694",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Coraza has Cookie Parser Confusion in github.com/corazawaf/coraza",
    "summary": "Coraza has Cookie Parser Confusion in github.com/corazawaf/coraza",
    "evidence": "osv:GO-2026-6694",
    "products": [
      {
        "name": {
          "value": "github.com/corazawaf/coraza",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      },
      {
        "name": {
          "value": "github.com/corazawaf/coraza/v2",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      },
      {
        "name": {
          "value": "github.com/corazawaf/coraza/v3",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "3.8.1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "GO-2026-6694",
      "aliases": [
        "CVE-2026-107835",
        "GHSA-g4qm-m288-5cp9",
        "GO-2026-6694"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/corazawaf/coraza",
            "purl": "pkg:golang/github.com/corazawaf/coraza",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://vuln.go.dev/ID/GO-2026-6694.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/corazawaf/coraza/v2",
            "purl": "pkg:golang/github.com/corazawaf/coraza/v2",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://vuln.go.dev/ID/GO-2026-6694.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "3.8.1"
                }
              ]
            }
          ],
          "package": {
            "name": "github.com/corazawaf/coraza/v3",
            "purl": "pkg:golang/github.com/corazawaf/coraza/v3",
            "ecosystem": "Go"
          },
          "database_specific": {
            "source": "https://vuln.go.dev/ID/GO-2026-6694.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-19T21:40:49.823376643Z",
      "provider": "osv",
      "references": [
        "https://github.com/corazawaf/coraza/security/advisories/GHSA-g4qm-m288-5cp9",
        "https://github.com/corazawaf/coraza/commit/0b940e197ad9983fb3aa36e84f1f81ff985461af",
        "https://github.com/corazawaf/coraza/commit/9f8521398d1ff023b958fad0b944cac265763866",
        "https://github.com/corazawaf/coraza/releases/tag/v3.8.1"
      ],
      "provider_metadata": {
        "url": "https://pkg.go.dev/vuln/GO-2026-6694",
        "review_status": "UNREVIEWED"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-107835",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 376742,
  "published_at": "2026-10-19T21:08:17+00:00"
}