Miggo Logo

CVE-2020-8141: Improper Control of Generation of Code in doT

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.76436%
Published
5/24/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
dotnpm<= 1.1.21.1.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from prototype pollution affecting templateSettings.varname used in doT.template's Function() constructor. The patch fixes the initialization of settings in InstallDots, but the exploit occurs when doT.template uses a polluted varname. The test case demonstrates code execution via prototype pollution, which would trigger during template compilation in doT.template.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T** *ot p**k*** v*.*.* us*s *un*tion() to *ompil* t*mpl*t*s. T*is **n ** *xploit** *y t** *tt**k*r i* t**y **n *ontrol t** *iv*n t*mpl*t* or i* t**y **n *ontrol t** v*lu* s*t on O*j**t.prototyp*.

Reasoning

T** vuln*r**ility st*ms *rom prototyp* pollution *****tin* `t*mpl*t*S*ttin*s.v*rn*m*` us** in `*oT.t*mpl*t*`'s `*un*tion()` *onstru*tor. T** p*t** *ix*s t** initi*liz*tion o* s*ttin*s in `Inst*ll*ots`, *ut t** *xploit o**urs w**n `*oT.t*mpl*t*` us*s