[depthfirst-2495] Upgrade lodash to 4.18.0#3277
Closed
depthfirst-app[bot] wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Close as the upgrade will be done as part of #3271 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Upgrade lodash to address Prototype Pollution and Code Injection vulnerabilities
Upgrade
lodashdependency inpackage.jsonfrom^4.17.21to^4.18.0.package-lock.jsonto reflect the new dependency tree. Thenpm installprocess successfully resolvedlodashto version4.18.1, which contains the target security fixes as well as a subsequent patch for aReferenceErrorbug present in4.18.0.Warnings
The
4.18.0release introduces strict behavior modifications to fix security vulnerabilities. Please review the following changes:_.unsetand_.omitmodifications: Theconstructorandprototypekeys are now unconditionally blocked as non-terminal path keys to prevent prototype pollution. Calls that previously returnedtrueand deleted properties from built-in prototypes will now safely returnfalseand leave the prototype unmodified._.templatemodifications: To fix code injection vulnerabilities,importskeys are now validated. Passingimportskeys containing forbidden identifier characters will now throw an"Invalid imports option passed into _.template"error.importskeys to templates or dynamically deleting prototype properties.Next Steps
_.template,_.unset, or_.omitto verify they remain unaffected by the stricter input validations.Vulnerabilities Fixed
ID: CVE-2026-2950
_.unsetand_.omit_.unsetand_.omitfunctions. The fix for CVE-2025-13465 only guards against string key members, so an attacker can bypass the check by passing array-wrapped path segments. This allows deletion of properties from built-in prototypes such asObject.prototype,Number.prototype, andString.prototype. The issue permits deletion of prototype properties but does not allow overwriting their original behavior.ID: CVE-2026-4800
_.templateimports key namesvariableoption in_.templatebut did not apply the same validation tooptions.importskey names. Both paths flow into the sameFunction()constructor sink. When an application passes untrusted input asoptions.importskey names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time. Additionally,_.templateusesassignInWithto merge imports, which enumerates inherited properties viafor..in. IfObject.prototypehas been polluted by any other vector, the polluted keys are copied into the imports object and passed toFunction().