fix: upgrade lodash to 4.18.1 (CVE-2026-4800) - #126
Conversation
Automated dependency upgrade by OrbisAI Security
linhongyu510
left a comment
There was a problem hiding this comment.
The CVE and the override strategy are valid, and I confirmed that the dependency tree is actually remediated. However, the exact version selected by this PR has since been marked as a bad release by npm, so it should not be merged as-is.
Blocking: use lodash 4.18.1, not deprecated 4.18.0
The reviewed GitHub advisory GHSA-r5fr-rjxr-66jc / CVE-2026-4800 lists 4.18.0 as the first patched version. The lockfile integrity in this PR also matches the npm registry. However, a clean install now reports:
npm warn deprecated lodash@4.18.0: Bad release. Please use lodash@4.17.21 instead.
The PR lockfile itself records the same deprecated field. The current non-deprecated release is 4.18.1, and I verified it as a drop-in replacement for this repository:
npm ci PASS, 456 packages, no lodash deprecation
npm ls lodash --all all three paths deduped/overridden to 4.18.1
npm test PASS, 9/9
npm run build PASS, all 10 locale groups / 1780 page hashes
npm audit no lodash finding
Please change the override and lockfile entry to 4.18.1. Its registry integrity is:
sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==
I also ran a minimal reproduction of the advisory's untrusted _.template(..., { imports }) key-name vector:
4.17.21 -> injected default expression executed (`pwned=true`)
4.18.0 -> rejected with "Invalid `imports` option" (`pwned=false`)
4.18.1 -> rejected with "Invalid `imports` option" (`pwned=false`)
Thus 4.18.1 retains the intended fix without installing a package that npm explicitly deprecates as a bad release.
Keep the diff scoped
package.json also rewrites the Chinese description as Unicode escapes. That is unrelated to the advisory and conflicts with the repository's readable JSON style. Regenerating the lockfile with the 4.18.1 override restores the original description automatically; please drop this noise.
Verification boundary
- The PR head itself passes
npm test(9/9),npm run build(10 locales),npm run lint(0 errors, 62 pre-existing warnings), andgit diff --check. npm auditstill reports 20 other findings (1 low, 4 moderate, 15 high); only the lodash finding is absent. This review does not claim the full dependency tree is clean.- Repository search found no runtime
_.templateuse and the PR correctly says reachability is unconfirmed. The PoC verifies package behavior, not application-level exploitability. - There are no competing open/closed PRs or issues for this CVE, and no PR checks or commit statuses.
AI-assisted disclosure: AI was used to enumerate the dependency paths and construct the version/PoC matrix; the reviewed advisory, registry metadata, clean installs, test/build output, and review conclusions were manually verified.
npm marked 4.18.0 a bad release recommending a rollback to the vulnerable 4.17.21. 4.18.1 keeps the CVE-2026-4800 fix without the deprecation warning. Also restores the package.json description field that was unintentionally rewritten as Unicode escapes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Review comments addressed. Pls review. |
linhongyu510
left a comment
There was a problem hiding this comment.
The requested changes are addressed at 7f685df: the override and lockfile now use the non-deprecated lodash 4.18.1, and the unrelated Unicode-escaped description change is gone.
I revalidated the updated head:
npm ci: PASS (456 packages; no lodash deprecation)npm ls lodash --all: all three dependency paths dedupe/override to 4.18.1- advisory PoC: 4.18.1 rejects the malicious imports key with
Invalid imports option;pwned=false npm test: PASS (9/9)npm run build: PASS (10 locale groups, 1780 page hashes)npm run lint: PASS with 0 errors and 62 pre-existing warningsgit diff --check: PASS- clean merge simulation onto current
main(130e9b7): PASS;npm ci, 9/9 tests, and the 4.18.1 dependency tree also pass
Registry metadata matches the lockfile integrity, and GHSA-r5fr-rjxr-66jc identifies 4.18.0 as the first patched version, so 4.18.1 retains the fix.
Non-blocking: please update the PR title and body from 4.18.0 to 4.18.1 so the security audit trail matches the final diff.
CI boundary: this head has no check runs, commit statuses, or branch Actions runs. npm audit could not be rerun because both the configured mirror and the official registry audit endpoint failed local TLS certificate validation; this approval relies on the reviewed advisory, exact registry metadata, installed dependency tree, targeted PoC, tests, lint, build, and merge simulation rather than a fresh full audit result.
Summary
Upgrade lodash from 4.17.21 to 4.18.0 to fix CVE-2026-4800.
Vulnerability
CVE-2026-4800package-lock.json(dependency:lodash)Description: lodash: lodash: Arbitrary code execution via untrusted input in template imports
Evidence
Scanner confirmation: trivy rule
CVE-2026-4800flagged this pattern.Changes
package.jsonpackage-lock.jsonBehavior Preservation
The change is scoped to 2 files on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.
This change addresses a pattern flagged by static analysis. The code path handles user-influenced input and the fix reduces the attack surface against both manual and automated exploitation.
Automated security fix by OrbisAI Security