CVE-2020-8141: Dot Improper Control Of Generation Of Vulnerability
HIGHCVE-2020-8141 is a HIGH (CVSS 8.8) improper control of generation of vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Dot libraries in the npm ecosystem. The issue involves improper control of generation of code in dot. Remediation is available by upgrading affected packages to version 1.1.3.
CVE-2020-8141 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2020-8141
To remediate this vulnerability, upgrade all affected Dot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install dot@1.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls dot
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-8141, inspect your project dependencies using npm:
npm ls dot
Analyze the terminal output to locate any version of Dot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.3), your application is affected.
Note: The npm ls dot command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Dot, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-8141 Affected Dot Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
dot
|
npm |
< 1.1.3
|
1.1.3
|
References
Frequently Asked Questions
What is CVE-2020-8141?
Which Dot versions are affected?
What version fixes CVE-2020-8141?
Is dot affected?
What is the CVSS score of CVE-2020-8141?
What CWE is associated with CVE-2020-8141?
How can I check npm dependencies for CVE-2020-8141?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-297x-8xj4-vcxv",
"modified" : "2022-06-23T06:55:22Z",
"published" : "2022-05-24T17:11:32Z",
"aliases" : [ "CVE-2020-8141" ],
"summary" : "Improper Control of Generation of Code in doT",
"details" : "The dot package v1.1.2 uses Function() to compile templates. This can be exploited by the attacker if they can control the given template or if they can control the value set on Object.prototype.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "dot"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.1.2"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8141"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/390929"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-23T06:55:22Z",
"nvd_published_at" : "2020-03-15T18:15:00Z"
}
}