Skip to content

fix: bump cookie to ^0.7.0 for CVE-2024-47764 (#932)#994

Merged
LongOddCode merged 1 commit intoAzure:mainfrom
LongOddCode:developer/LongOddCode/cookie-cve-2024-47764
Apr 21, 2026
Merged

fix: bump cookie to ^0.7.0 for CVE-2024-47764 (#932)#994
LongOddCode merged 1 commit intoAzure:mainfrom
LongOddCode:developer/LongOddCode/cookie-cve-2024-47764

Conversation

@LongOddCode
Copy link
Copy Markdown
Contributor

Problem

Issue #932cookie@^0.5.0 is vulnerable to CVE-2024-47764 (CVSS 9.1, Critical). Maliciously crafted cookie values can inject unexpected object keys such as __proto__, constructor, or prototype, enabling prototype pollution.

Two prior attempts — #960 (minimal) and #962 (combined) — were closed without explanation. The issue is still open and package.json on main still pins cookie: ^0.5.0. This PR revives the minimal fix in the spirit of #960.

Root Cause

Direct dependency on a vulnerable range.

Fix

File Change
package.json cookie ^0.5.0^0.7.0
package-lock.json cookie resolved to 0.7.2; incidental peer-marker drift from lockfile regeneration (no other package versions changed — verified by git diff grep on "version":).

Compatibility

The only runtime consumer is src/core/utils/cookie.ts, which calls cookie.serialize(name, value, options) and cookie.parse(str). Both signatures are unchanged in 0.7.x, so this is a drop-in replacement. See the cookie 0.7.0 changelog for details.

Testing

  • npm install succeeds; package-lock.json regenerates cleanly.
  • git diff confirms only cookie version changed materially (only two "version": diff lines).
  • ✅ Call sites in src/core/utils/cookie.ts use APIs preserved in 0.7.x.

References

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.
@LongOddCode LongOddCode merged commit ba76794 into Azure:main Apr 21, 2026
24 checks passed
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.

Vulnerable dependency cookie < 0.7.0

2 participants