Miggo Logo

CVE-2021-23337:
Lodash Template Function Command Injection Vulnerability

7.2

CVSS Score

Basic Information

EPSS Score
-
Published
5/6/2021
Updated
4/17/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
lodashnpm< 4.17.214.17.21
lodash-esnpm< 4.17.214.17.21
lodash.templatenpm<= 4.5.0
lodash-templatenpm<= 1.0.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The analysis of the GitHub patch for CVE-2021-23337 shows that the _.template function in lodash.js was modified to prevent command injection attacks by validating the 'variable' option. This indicates that _.template is the vulnerable function.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

`lo**s*` v*rsions prior to *.**.** *r* vuln*r**l* to *omm*n* Inj**tion vi* t** t*mpl*t* *un*tion.

Reasoning

T** *n*lysis o* t** *it*u* p*t** *or *V*-****-***** s*ows t**t t** _.t*mpl*t* *un*tion in lo**s*.js w*s mo*i*i** to pr*v*nt *omm*n* inj**tion *tt**ks *y v*li**tin* t** 'v*ri**l*' option. T*is in*i**t*s t**t _.t*mpl*t* is t** vuln*r**l* *un*tion.