Skip to content

chore(deps): bump lodash to 4.18.1 (CVE-2026-4800)#413

Merged
calvinbrewer merged 1 commit intomainfrom
dan/bump-lodash-4.18.1
May 5, 2026
Merged

chore(deps): bump lodash to 4.18.1 (CVE-2026-4800)#413
calvinbrewer merged 1 commit intomainfrom
dan/bump-lodash-4.18.1

Conversation

@coderdan
Copy link
Copy Markdown
Contributor

@coderdan coderdan commented May 5, 2026

Summary

  • Bumps transitive lodash from 4.17.234.18.1 to patch GHSA-r5fr-rjxr-66jc / CVE-2026-4800 (high): code injection via _.template when imports keys are attacker-controlled.
  • Closes Dependabot alert #88.

Why this looked like the vite case at first — and why it isn't

Like the vite alert, lodash here is a transitive dep with manifest_path: pnpm-lock.yaml. But unlike vite, lodash is a normal transitive (pulled in by json-schema-to-typescript@15.0.4, which declares lodash: ^4.17.21), not an optional peer auto-install. pnpm's overrides mechanism applies cleanly here.

The existing override at >=4.17.23 already targeted lodash — it just hadn't been bumped past the patched cutoff. Raising it to >=4.18.0 resolves to the patched line.

Why a hand-edited lockfile (vs. pnpm install)

A full regen with the bumped override correctly picked lodash@4.18.1, but it also walked the rest of the tree and pulled in ~30 unrelated transitive bumps (drizzle-orm 0.44.7 → 0.45.2, @types/node 22.19.3 → 22.19.17, drizzle-kit 0.30.6 → 0.31.10, etc.). That's well outside the scope of a CVE patch, so I did a surgical 3-spot edit of the lockfile instead:

  1. lodash@4.17.23:lodash@4.18.1: with the new integrity hash (sourced from npm view lodash@4.18.1 dist.integrity).
  2. json-schema-to-typescript@15.0.4's snapshot dep ref lodash: 4.17.23lodash: 4.18.1.
  3. Snapshot key lodash@4.17.23: {}lodash@4.18.1: {}.

pnpm install --frozen-lockfile accepts the lockfile and downloads lodash@4.18.1 correctly.

Note: 4.18.1 satisfies json-schema-to-typescript's declared lodash: ^4.17.21 range, so no API compatibility risk.

Summary by CodeRabbit

  • Chores
    • Updated the minimum version requirement for the lodash dependency to ensure application stability and compatibility.

@coderdan coderdan requested a review from a team as a code owner May 5, 2026 08:08
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

⚠️ No Changeset found

Latest commit: 39ddb06

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@coderdan has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 14 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9a600412-eea0-42ed-9435-8d37a99d99ce

📥 Commits

Reviewing files that changed from the base of the PR and between b7ebcca and 39ddb06.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json
📝 Walkthrough

Walkthrough

The minimum version constraint for the lodash package in the package.json overrides section is bumped from >=4.17.23 to >=4.18.0, enforcing use of a newer patch release.

Changes

Dependency Override Update

Layer / File(s) Summary
Version Constraint
package.json
lodash override minimum version increased from >=4.17.23 to >=4.18.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • yujiyokoo

Poem

🐰 A hop, a bump, a version rise,
Lodash climbs to 4.18—no surprise!
Safer shores and patches bright,
Dependencies dance in the moonlight. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: bumping lodash to 4.18.1 to address a specific CVE security vulnerability. It is concise, clear, and directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dan/bump-lodash-4.18.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Patches GHSA-r5fr-rjxr-66jc / CVE-2026-4800 (high): lodash <= 4.17.23
allows code injection via _.template when an attacker controls the
imports option keys.

Lodash is a transitive runtime dep here (pulled in by
json-schema-to-typescript@15.0.4, which declares lodash: ^4.17.21).
The existing root override "lodash": ">=4.17.23" accepted the
vulnerable 4.17.23; bumping to ">=4.18.0" pushes the resolved
version into the patched line (4.18.0+).

The pnpm-lock.yaml change is intentionally a surgical hand-edit of the
three lodash references (resolution + integrity, parent's dep ref,
snapshot key) rather than a full regen. A regen with the override
change ended up bumping ~30 unrelated transitives (drizzle-orm,
@types/node, drizzle-kit, etc.) because pnpm took the chance to walk
the rest of the lockfile too. Surgical edit keeps the blast radius to
just lodash, and `pnpm install --frozen-lockfile` validates cleanly.
@coderdan coderdan force-pushed the dan/bump-lodash-4.18.1 branch from b7ebcca to 39ddb06 Compare May 5, 2026 08:49
@calvinbrewer calvinbrewer merged commit b876712 into main May 5, 2026
7 checks passed
@calvinbrewer calvinbrewer deleted the dan/bump-lodash-4.18.1 branch May 5, 2026 16:46
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.

2 participants