Skip to content

fix: update cookie dependency to ^0.7.0 to address CVE-2024-47764#960

Closed
keith-oak wants to merge 1 commit intoAzure:mainfrom
keith-oak:fix-cookie-vulnerability-cve-2024-47764
Closed

fix: update cookie dependency to ^0.7.0 to address CVE-2024-47764#960
keith-oak wants to merge 1 commit intoAzure:mainfrom
keith-oak:fix-cookie-vulnerability-cve-2024-47764

Conversation

@keith-oak
Copy link
Copy Markdown

@keith-oak keith-oak commented Jun 24, 2025

Summary

Details

This PR updates the cookie dependency to version 0.7.0 which includes proper validation to prevent malicious cookie values from injecting special properties like __proto__, constructor, or prototype into JavaScript objects.

The vulnerability (CVE-2024-47764) is rated as critical with a CVSS score of 9.1/10 and could allow attackers to perform prototype pollution attacks through specially crafted cookie values.

Changes Made

  • Updated cookie from ^0.5.0 to ^0.7.0 in package.json
  • Ran npm install to update package-lock.json accordingly

Testing

  • ✅ All unit tests pass (npm test)
  • ✅ Build completes successfully (npm run build)
  • ✅ No breaking changes - cookie 0.7.0 maintains backward compatibility

References

Updates the cookie package from ^0.5.0 to ^0.7.0 to fix a critical security vulnerability (CVE-2024-47764) that allows malicious cookie values to inject unexpected key-value pairs into JavaScript objects.

The vulnerability could allow attackers to inject special properties like __proto__, constructor, or prototype through malicious cookie values.

Cookie 0.7.0 includes proper validation to prevent these injection attacks while maintaining backward compatibility.
@keith-oak keith-oak closed this by deleting the head repository Aug 13, 2025
LongOddCode added a commit that referenced this pull request Apr 21, 2026
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 (#960, #962) were closed without explanation; issue #932 is still open.

The additional lockfile churn is npm's standard peer-marker drift when regenerating the tree — no other package versions changed.
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

1 participant