Skip to content

Override unused vulnerable lodash.pick with patched lodash - #419

Merged
puneetlath merged 3 commits into
mainfrom
claude-removeLodashPick
Oct 28, 2026
Merged

puneetlath merged 3 commits into
mainfrom
claude-removeLodashPick

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

@puneetlath please review

Explanation of Change

Clears the high-severity lodash.pick alert (GHSA-p6mc-m468-83gw, prototype pollution).

  • Why override, not upgrade: lodash.pick has no patched release. 4.4.0 is the last version, and npm marks it deprecated. Every react-native-onyx release, including the latest, still lists it.
  • How it's used: it isn't. react-native-onyx (our only path to it) declares it but never loads it. Onyx 2.0.90 imports lodash/pick from full lodash instead (lib/Onyx.ts:3). No k2 code imports lodash.
  • Fix: a scoped npm overrides entry swaps Onyx's lodash.pick for patched lodash@4.17.21, the same tarball already in the lockfile. The bundle is unchanged because nothing requires lodash.pick.
  • Lockfile edited by hand. CI npm ci and lint:firefox validate it.
  • Remove the override once Onyx drops the dependency (Remove unused lodash.pick dependency) and k2 bumps Onyx.
Change Log
  • lodash.pick 4.4.0 → aliased to lodash 4.17.21
  • lodash 4.17.19: fixes prototype pollution (CVE-2020-8203)
  • lodash 4.17.20: fixes _.template ReDoS issues
  • lodash 4.17.21: fixes _.template command injection (CVE-2021-23337) and toNumber/trim ReDoS (CVE-2020-28500)

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/695612

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.

Suggested:

  1. Run npm ci. Confirm it succeeds and npm ls lodash.pick shows lodash.pick@npm:lodash@4.17.21.
  2. Run npm run build and npm run build:firefox. Confirm both succeed.
  3. Load dist/ as an unpacked extension. Open the K2 dashboard. Confirm Hot Picks, Assigned, and Engineering issue lists load.
  4. Reload the page. Confirm cached issues show right away (Onyx persistence still works).

QA

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.

@yuwenmemon
yuwenmemon requested a review from a team October 26, 2026 17:59
@melvin-bot
melvin-bot Bot requested review from puneetlath and removed request for a team October 26, 2026 18:00
puneetlath
puneetlath previously approved these changes Oct 27, 2026
@puneetlath

Copy link
Copy Markdown
Contributor

@yuwenmemon conflicts.

@yuwenmemon

Copy link
Copy Markdown
Contributor

Fixed

@puneetlath
puneetlath merged commit fb1c731 into main Oct 28, 2026
5 of 6 checks passed
@puneetlath
puneetlath deleted the claude-removeLodashPick branch October 28, 2026 15:22
@os-botify

os-botify Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

🚀 Released in version 1.5.90 🚀

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.

3 participants