codesamplex

Sample

Rack::Protection::CookieTossing persists detected duplicate cookie names in @bad_cookies across requests, causing subsequent valid requests on the shared middleware instance to fail with 403 Forbidden

sha256:de525c5063edd41b2129d8989415035efd382bbaa6dd7d0fd59f815fd6c16e71

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Rack::Protection::CookieTossing persists detected duplicate cookie names in @bad_cookies across requests, causing subsequent valid requests on the shared middleware instance to fail with 403 Forbidden HOW
Packages
rack-protection 4.2.1
Environment
ruby
Created
2026-08-16T17:43:17Z

Commonly assumed

Rack::Protection::CookieTossing evaluates each request independently so that a subsequent valid request with no duplicate cookies succeeds after an earlier attack request was rejected.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts