CVE-2023-3481: Critters Cross-Site Scripting Vulnerability
MODERATECVE-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.
CVE-2023-3481 at a Glance
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).
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.
npm install critters@0.0.20
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
CVE-2023-3481 Affected Critters Versions
1 component(s)| 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?
Which Critters versions are affected?
What version fixes CVE-2023-3481?
Is critters affected?
What is the CVSS score of CVE-2023-3481?
What CWE is associated with CVE-2023-3481?
How can I check npm dependencies for CVE-2023-3481?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}