CVE-2021-26276: Config shield Remote Code Execution Vulnerability
MODERATECVE-2021-26276 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-913: Improper Control of Dynamically-Managed Code Resources) affecting Config shield libraries in the npm ecosystem. The issue involves improper control of dynamically-managed code resources in config-shield. Remediation is available by upgrading affected packages to version 0.2.3.
CVE-2021-26276 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2021-26276
To remediate this vulnerability, upgrade all affected Config shield 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 config-shield@0.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls config-shield
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-26276, inspect your project dependencies using npm:
npm ls config-shield
Analyze the terminal output to locate any version of Config shield in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.3), your application is affected.
Note: The npm ls config-shield 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-913: Improper Control of Dynamically-Managed Code Resources, where the product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements. In Config shield, 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-2021-26276 Affected Config shield Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
config-shield
|
npm |
< 0.2.3
|
0.2.3
|
References
Frequently Asked Questions
What is CVE-2021-26276?
Which Config shield versions are affected?
What version fixes CVE-2021-26276?
Is config-shield affected?
What is the CVSS score of CVE-2021-26276?
What CWE is associated with CVE-2021-26276?
How can I check npm dependencies for CVE-2021-26276?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w8h4-vw8f-rvvj",
"modified" : "2023-09-12T19:22:22Z",
"published" : "2021-04-13T15:30:09Z",
"aliases" : [ "CVE-2021-26276" ],
"summary" : "Improper Control of Dynamically-Managed Code Resources in config-shield",
"details" : "scripts/cli.js in the GoDaddy node-config-shield (aka Config Shield) package before 0.2.2 for Node.js calls eval when processing a set command. **NOTE:** the vendor reportedly states that this is not a vulnerability. The set command was not intended for use with untrusted data.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "config-shield"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-26276"
}, {
"type" : "WEB",
"url" : "https://github.com/godaddy/node-config-shield/commit/cdba5d3a7accd661ffbc52e208153464bd0d9da6"
}, {
"type" : "WEB",
"url" : "https://advisory.checkmarx.net/advisory/CX-2021-4773"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/godaddy/node-config-shield"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-913" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-05T22:44:52Z",
"nvd_published_at" : "2021-01-27T20:15:00Z"
}
}