Vulnerabilities in pkg:npm/curly-bracket-parser

PACKAGE
Advisory Identifier: GHSA-rqf8-8c89-mw29
Advisory Summary

CVE-2021-23416 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Curly bracket parser libraries in the npm ecosystem. The issue involves cross-site scripting in curly-bracket-parser. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/curly-bracket-parser

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-rqf8-8c89-mw29 CVE-2021-23416 MODERATE Cross-site Scripting in curly-bracket-parser

CVE-2021-23416 at a Glance

CVE Identifier CVE-2021-23416
GHSA Identifier GHSA-rqf8-8c89-mw29
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Curly bracket parser
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.4

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:R/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-23416

To remediate this vulnerability, upgrade all affected Curly bracket parser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

curly-bracket-parser fixed: Latest secure release
npm install curly-bracket-parser@Latest secure release
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 curly-bracket-parser

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-23416, inspect your project dependencies using npm:

npm ls curly-bracket-parser

Analyze the terminal output to locate any version of Curly bracket parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls curly-bracket-parser 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Curly bracket parser, 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

This affects all versions of package curly-bracket-parser. When used as a template library, it does not properly sanitize the user input.

CVE-2021-23416 Affected Curly bracket parser Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
curly-bracket-parser
npm
≤ 1.0.2

References

Frequently Asked Questions

What is CVE-2021-23416?
CVE-2021-23416 is a security vulnerability in Curly bracket parser involving Cross-site Scripting in curly-bracket-parser under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Curly bracket parser versions are affected?
Affected versions include releases prior to current release patches across affected packages: curly-bracket-parser.
What version fixes CVE-2021-23416?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is curly-bracket-parser affected?
Yes, curly-bracket-parser is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-23416?
CVE-2021-23416 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2021-23416?
CVE-2021-23416 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2021-23416?
Run the dependency tree command: 'npm ls curly-bracket-parser'. 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-rqf8-8c89-mw29",
  "modified" : "2021-08-31T21:14:23Z",
  "published" : "2021-08-10T16:08:16Z",
  "aliases" : [ "CVE-2021-23416" ],
  "summary" : "Cross-site Scripting in curly-bracket-parser",
  "details" : "This affects all versions of package curly-bracket-parser.\n When used as a template library, it does not properly sanitize the user input.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "curly-bracket-parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23416"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/magynhard/curly-bracket-parser"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/magynhard/curly-bracket-parser/blob/master/src/curly-bracket-parser/curly-bracket-parser.js#23L31"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/magynhard/curly-bracket-parser/blob/master/src/curly-bracket-parser/curly-bracket-parser.js%23L31"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-CURLYBRACKETPARSER-1297106"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-02T18:39:58Z",
    "nvd_published_at" : "2021-07-28T16:15:00Z"
  }
}