fix: bump cookie to ^0.7.0 for CVE-2024-47764 (#932)#994
Merged
LongOddCode merged 1 commit intoAzure:mainfrom Apr 21, 2026
Merged
Conversation
cookie < 0.7.0 is vulnerable to CVE-2024-47764 (CVSS 9.1, Critical): malicious cookie values can inject unexpected object keys like __proto__/constructor/prototype, enabling prototype pollution. Resolved to cookie@0.7.2 in the lockfile. The package's serialize()/parse() signatures used in src/core/utils/cookie.ts are unchanged in 0.7.x, so this is a drop-in replacement. Reviving the fix after the prior attempts (Azure#960, Azure#962) were closed without explanation; issue Azure#932 is still open. The additional lockfile churn is npm's standard peer-marker drift when regenerating the tree — no other package versions changed.
cjk7989
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Issue #932 —
cookie@^0.5.0is vulnerable to CVE-2024-47764 (CVSS 9.1, Critical). Maliciously crafted cookie values can inject unexpected object keys such as__proto__,constructor, orprototype, enabling prototype pollution.Two prior attempts — #960 (minimal) and #962 (combined) — were closed without explanation. The issue is still open and
package.jsononmainstill pinscookie: ^0.5.0. This PR revives the minimal fix in the spirit of #960.Root Cause
Direct dependency on a vulnerable range.
Fix
package.jsoncookie^0.5.0→^0.7.0package-lock.jsoncookieresolved to0.7.2; incidental peer-marker drift from lockfile regeneration (no other package versions changed — verified bygit diffgrep on"version":).Compatibility
The only runtime consumer is
src/core/utils/cookie.ts, which callscookie.serialize(name, value, options)andcookie.parse(str). Both signatures are unchanged in0.7.x, so this is a drop-in replacement. See the cookie 0.7.0 changelog for details.Testing
npm installsucceeds;package-lock.jsonregenerates cleanly.git diffconfirms onlycookieversion changed materially (only two"version":diff lines).src/core/utils/cookie.tsuse APIs preserved in 0.7.x.References
cookie < 0.7.0#932