Vulnerabilities in pkg:npm/critters

PACKAGE
Advisory Identifier: GHSA-cx3j-qqxj-9597
Advisory Summary

CVE-2023-3481 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Critters libraries in the npm ecosystem. The issue involves critters cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 0.0.20.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/critters

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-cx3j-qqxj-9597 CVE-2023-3481 MODERATE Critters Cross-site Scripting Vulnerability

CVE-2023-3481 at a Glance

CVE Identifier CVE-2023-3481
GHSA Identifier GHSA-cx3j-qqxj-9597
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Critters
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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:C/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 Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2023-3481

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

critters fixed: 0.0.20
npm install critters@0.0.20
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 critters

How to Check if You Are Affected

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

npm ls critters

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

Note: The npm ls critters 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Critters, 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

### Impact Critters version 0.0.17-0.0.19 have an issue when parsing the HTML which leads to a potential [cross-site scripting (XSS)](https://owasp.org/www-community/attacks/xss/) bug. ### Patches The bug has been fixed in `v0.0.20`. ### Workarounds Upgrading Critters version to `>0.0.20` is the easiest fix. This is a non breaking version upgrade so we recommend all users to use `v0.0.20`.

CVE-2023-3481 Affected Critters Versions

1 component(s)
Fixed Versions:
0.0.20
Product / Package Ecosystem Affected Versions Fixed Version
critters
npm
≥ 0.0.17
< 0.0.20
0.0.20

References

Frequently Asked Questions

What is CVE-2023-3481?
CVE-2023-3481 is a security vulnerability in Critters involving Critters Cross-site Scripting Vulnerability under CWE-116: Improper Encoding or Escaping of Output.
Which Critters versions are affected?
Affected versions include releases prior to 0.0.20 across affected packages: critters.
What version fixes CVE-2023-3481?
Upgrading to 0.0.20 (or the latest patched release for your respective branch) resolves the vulnerability.
Is critters affected?
Yes, critters is affected in releases prior to 0.0.20. Upgrade your dependency to 0.0.20 or later.
What is the CVSS score of CVE-2023-3481?
CVE-2023-3481 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2023-3481?
CVE-2023-3481 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check npm dependencies for CVE-2023-3481?
Run the dependency tree command: 'npm ls critters'. 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-cx3j-qqxj-9597",
  "modified" : "2023-08-25T18:55:56Z",
  "published" : "2023-08-11T18:57:53Z",
  "aliases" : [ "CVE-2023-3481" ],
  "summary" : "Critters Cross-site Scripting Vulnerability",
  "details" : "### Impact\nCritters version 0.0.17-0.0.19 have an issue when parsing the HTML which leads to a potential [cross-site scripting (XSS)](https://owasp.org/www-community/attacks/xss/) bug.\n\n### Patches\nThe bug has been fixed in `v0.0.20`.\n\n### Workarounds\nUpgrading Critters version to `>0.0.20` is the easiest fix. This is a non breaking version upgrade so we recommend all users to use `v0.0.20`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "critters"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.17"
      }, {
        "fixed" : "0.0.20"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.0.19"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/GoogleChromeLabs/critters/security/advisories/GHSA-cx3j-qqxj-9597"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-3481"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/GoogleChromeLabs/critters/pull/133"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/GoogleChromeLabs/critters/commit/7757902c9e0b3285d516359b3cb602cd9d50d80e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/GoogleChromeLabs/critters"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-79", "CWE-80" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-11T18:57:53Z",
    "nvd_published_at" : "2023-08-21T11:15:07Z"
  }
}