Skip to content

Commit a5df825

Browse files
committed
Resolve CVE-2026-4800 by bumping lodash and lodash-es to ^4.18.0
Details: The fix for CVE-2021-23337 added validation for the variable option in _.template but did not apply the same validation to options.imports key names. Both paths flow into the same Function() constructor sink. When an application passes untrusted input as options.imports key names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time. Additionally, _.template uses assignInWith to merge imports, which enumerates inherited properties via for..in. If Object.prototype has been polluted by any other vector, the polluted keys are copied into the imports object and passed to Function(). Impact: When an application passes untrusted input as options.imports key names to _.template, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time. Additionally, prototype pollution can be exploited via assignInWith to inject keys into the Function() constructor. Fix: Bumped lodash and lodash-es resolutions to ^4.18.0 in package.json. Version 4.18.0 validates importsKeys against reForbiddenIdentifierChars and replaces assignInWith with assignWith when merging imports. Signed-off-by: KashKondaka <37753523+KashKondaka@users.noreply.github.com>
1 parent 95d71cb commit a5df825

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"kind-of": "^6.0.3",
3838
"glob-parent": "^5.1.2",
3939
"ssri": "^6.0.2",
40-
"lodash": "^4.17.21",
40+
"lodash": "^4.18.0",
4141
"hosted-git-info": "^2.8.9",
4242
"json-schema": "^0.4.0",
4343
"ansi-regex": "^5.0.1",
@@ -51,7 +51,8 @@
5151
"@babel/traverse": "^7.20.12",
5252
"word-wrap": "^1.2.4",
5353
"@cypress/request": "^3.0.0",
54-
"vis-data": "7.1.6"
54+
"vis-data": "7.1.6",
55+
"lodash-es": "^4.18.0"
5556
},
5657
"devDependencies": {
5758
"@babel/plugin-transform-class-properties": "^7.22.9",

0 commit comments

Comments
 (0)