Vulnerabilities in pkg:npm/config-shield

PACKAGE
Advisory Identifier: GHSA-w8h4-vw8f-rvvj
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/config-shield

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/config-shield. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-w8h4-vw8f-rvvj CVE-2021-26276 MODERATE Improper Control of Dynamically-Managed Code Resources in config-shield

CVE-2021-26276 at a Glance

CVE Identifier CVE-2021-26276
GHSA Identifier GHSA-w8h4-vw8f-rvvj
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-913: Improper Control of Dynamically-Managed Code Resources
Affected Product Config shield
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

config-shield fixed: 0.2.3
npm install config-shield@0.2.3
Verify Direct and Transitive Dependencies

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

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.

CVE-2021-26276 Affected Config shield Versions

1 component(s)
Fixed Versions:
0.2.3
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?
CVE-2021-26276 is a security vulnerability in Config shield involving Improper Control of Dynamically-Managed Code Resources in config-shield under CWE-913: Improper Control of Dynamically-Managed Code Resources.
Which Config shield versions are affected?
Affected versions include releases prior to 0.2.3 across affected packages: config-shield.
What version fixes CVE-2021-26276?
Upgrading to 0.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is config-shield affected?
Yes, config-shield is affected in releases prior to 0.2.3. Upgrade your dependency to 0.2.3 or later.
What is the CVSS score of CVE-2021-26276?
CVE-2021-26276 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2021-26276?
CVE-2021-26276 is classified under CWE-913: Improper Control of Dynamically-Managed Code Resources (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.).
How can I check npm dependencies for CVE-2021-26276?
Run the dependency tree command: 'npm ls config-shield'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}