CVE-2021-23337 is a high-severity command-injection flaw in Lodash versions before 4.17.21. Applications that pass attacker-controlled input to the variable option of _.template may allow that input to alter the generated function definition and execute arbitrary JavaScript commands, potentially compromising confidentiality, integrity, and availability. The vulnerability is rated CVSS 7.2.
Lodash remediated the issue by validating the template variable option and rejecting values containing function-altering characters, including parentheses, commas, equals signs, braces, brackets, slashes, and whitespace. The project added a regression test covering an attempted console.log(process.env) payload; organizations using affected Lodash releases should upgrade to 4.17.21 or later and review uses of _.template that incorporate untrusted values.

See affected versions and whether adversaries are exploiting it.
3 events from the most recent confirmed update back to the earliest known activity.
The CVE record for CVE-2021-23337 was updated.
CVE-2021-23337 was published for a high-severity command-injection vulnerability in Lodash versions before 4.17.21, reachable through the template function.
The Lodash project added validation that rejects forbidden characters in _.template's variable option, preventing values from altering generated function parameters. It also added a regression test using a payload intended to execute console.log(process.env).
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
3 references tracked. Mallory keeps watching after this page renders.
cve.org
Open sourcegithub.com
Open sourcesnyk.io
Open sourceMap indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.