fix: resolve lodash prototype pollution vulnerability (CVE-2025-13465)#220
fix: resolve lodash prototype pollution vulnerability (CVE-2025-13465)#220kherembourg merged 1 commit intomainfrom
Conversation
Add npm override in RN test project to force lodash to >=4.17.23, fixing Dependabot alert #529 for prototype pollution in _.unset and _.omit functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @kherembourg, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical security vulnerability (CVE-2025-13465) related to prototype pollution in Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses the lodash prototype pollution vulnerability by using npm's overrides feature to enforce a secure version of lodash. My review includes a suggestion to make the version constraint in the override safer against potential future breaking changes.
| "node": ">=18" | ||
| }, | ||
| "overrides": { | ||
| "lodash": ">=4.17.23" |
There was a problem hiding this comment.
Using >= for the lodash version in overrides could be risky. If a new major version of lodash (e.g., 5.0.0) is released, npm might install it, which could introduce breaking changes. It's safer to use a caret ^ to restrict updates to minor and patch versions within the current major version. This ensures you get security patches without accidentally pulling in breaking changes.
| "lodash": ">=4.17.23" | |
| "lodash": "^4.17.23" |
Summary
overridesintest-projects/rn-purchasely-test/package.jsonto forcelodashto>=4.17.23package-lock.jsonto resolve the vulnerable transitive dependencySecurity
Fixes Dependabot alert #529 — lodash >= 4.0.0, <= 4.17.22 has a Prototype Pollution vulnerability in
_.unsetand_.omitfunctions (CVE-2025-13465, Medium severity).Note: The main workspace already had a yarn resolution for lodash >= 4.17.23 (from PR #216). This fix addresses the remaining vulnerable instance in the RN test project's npm lock file.
Test plan
npm installsucceeds in RN test projectlodashresolves to 4.17.23 in lock filenpm auditshows 0 vulnerabilities🤖 Generated with Claude Code