Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix panic in cookie.Cookie() on malformed multipart cookie names - #616

#616
Open
kanywst wants to merge 1 commit into
vouch:mastervouch/vouch-proxy:masterfrom
kanywst:fix/cookie-parse-panickanywst/vouch-proxy:fix/cookie-parse-panicCopy head branch name to clipboard
Open

fix panic in cookie.Cookie() on malformed multipart cookie names#616
kanywst wants to merge 1 commit into
vouch:mastervouch/vouch-proxy:masterfrom
kanywst:fix/cookie-parse-panickanywst/vouch-proxy:fix/cookie-parse-panicCopy head branch name to clipboard

Conversation

@kanywst

@kanywst kanywst commented Jul 19, 2026

Copy link
Copy Markdown

Fixes #615.

Some malformed multipart cookie names panic cookie.Cookie() with an index out of range, reachable unauthenticated via /validate: a name without an of separator, or a part index outside 1..numParts. CVE-2026-55149's fix covered the part count but not these.

Reject the name when the split isn't two parts, and require 1 <= i <= numParts. Adds a regression test covering the malformed names and a valid multipart cookie.

A multipart cookie name without an of separator, or with a part index of
zero or negative, reached an index out of range in cookie.Cookie(),
reachable unauthenticated via /validate. Reject a name that does not split
into two parts, and require 1 <= i <= numParts. Adds a regression test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic in cookie.Cookie() on malformed multipart cookie names

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.