CVE-2021-32819: Squirrelly Insecure Template Handling Vulnerability
HIGHCVE-2021-32819 is a HIGH (CVSS 8.0) insecure template handling vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Squirrelly libraries in the npm ecosystem. The issue involves insecure template handling in squirrelly. Remediation is available by upgrading affected packages to version 9.0.0.
CVE-2021-32819 at a Glance
Security Impact
CVSS: 8.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2021-32819
To remediate this vulnerability, upgrade all affected Squirrelly 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 squirrelly@9.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls squirrelly
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-32819, inspect your project dependencies using npm:
npm ls squirrelly
Analyze the terminal output to locate any version of Squirrelly in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.0.0), your application is affected.
Note: The npm ls squirrelly 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Squirrelly, 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-32819 Affected Squirrelly Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
squirrelly
|
npm |
< 9.0.0
|
9.0.0
|
References
Frequently Asked Questions
What is CVE-2021-32819?
Which Squirrelly versions are affected?
What version fixes CVE-2021-32819?
Is squirrelly affected?
What is the CVSS score of CVE-2021-32819?
What CWE is associated with CVE-2021-32819?
How can I check npm dependencies for CVE-2021-32819?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q8j6-pwqx-pm96",
"modified" : "2023-09-11T16:25:10Z",
"published" : "2021-05-17T20:58:02Z",
"aliases" : [ "CVE-2021-32819" ],
"summary" : "Insecure template handling in Squirrelly",
"details" : "Squirrelly is a template engine implemented in JavaScript that works out of the box with ExpressJS. Squirrelly mixes pure template data with engine configuration options through the Express render API. By overwriting internal configuration options remote code execution may be triggered in downstream applications. Version 9.0.0 has a fix for this issue. For complete details refer to the referenced [GHSL-2021-023](https://securitylab.github.com/advisories/GHSL-2021-023-squirrelly/).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "squirrelly"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.0.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.0.8"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32819"
}, {
"type" : "WEB",
"url" : "https://github.com/squirrellyjs/squirrelly/pull/254"
}, {
"type" : "WEB",
"url" : "https://github.com/squirrellyjs/squirrelly/commit/c12418a026f73df645ba927fd29358efe02fed1e"
}, {
"type" : "WEB",
"url" : "https://github.com/squirrellyjs/squirrelly/commit/dca7a1e7ee91d8a6ffffb655f3f15647486db9da"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/squirrellyjs/squirrelly"
}, {
"type" : "ADVISORY",
"url" : "https://securitylab.github.com/advisories/GHSL-2021-023-squirrelly"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-17T18:46:59Z",
"nvd_published_at" : "2021-05-14T19:15:00Z"
}
}