Arbitrary Code Injection Affecting org.webjars.bower:underscore Open this link in a new tab package, versions [0,]
Exploit Maturity
Proof of concept
Attack Complexity
High
Privileges Required
High
Confidentiality
High
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications-
snyk-id
SNYK-JAVA-ORGWEBJARSBOWER-1081504
-
published
29 Mar 2021
-
disclosed
2 Mar 2021
-
credit
Alessio Della Libera (@d3lla)
Introduced: 2 Mar 2021
CVE-2021-23358 Open this link in a new tabHow to fix?
There is no fixed version for org.webjars.bower:underscore
.
Overview
org.webjars.bower:underscore is a JavaScript's functional programming helper library.
Affected versions of this package are vulnerable to Arbitrary Code Injection via the template
function, particularly when the variable
option is taken from _.templateSettings
as it is not sanitized.
PoC
const _ = require('underscore');
_.templateSettings.variable = "a = this.process.mainModule.require('child_process').execSync('touch HELLO')";
const t = _.template("")();