Vulnerabilities in pkg:npm/litespeed.js
PACKAGECVE-2021-23682 is a CRITICAL (CVSS 9.8) prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Litespeed.js libraries in the npm ecosystem. The issue involves prototype pollution in litespeed.js and appwrite/server-ce. Remediation is available by upgrading affected packages to version 0.3.12, 0.12.2, 0.11.1.
pkg:npm/litespeed.js
Vulnerability advisories affecting package pkg:npm/litespeed.js. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v9p9-535w-4285 | CVE-2021-23682 | CRITICAL | Prototype Pollution in litespeed.js and appwrite/server-ce |
CVE-2021-23682 at a Glance
Security Impact
CVSS: 9.8
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:H/I:H/A:H).
How to Fix CVE-2021-23682
To remediate this vulnerability, upgrade all affected Litespeed.js 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 litespeed.js@0.3.12
Upgrade appwrite/server-ce to 0.12.2
Upgrade appwrite/server-ce to 0.11.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls litespeed.js
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-23682, inspect your project dependencies using npm:
npm ls litespeed.js
Analyze the terminal output to locate any version of Litespeed.js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.12), your application is affected.
Note: The npm ls litespeed.js 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Litespeed.js, 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-23682 Affected Litespeed.js Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
litespeed.js
|
npm |
< 0.3.12
|
0.3.12
|
|
appwrite/server-ce
|
Packagist |
≥ 0.12.0
< 0.12.2
|
0.12.2
|
|
appwrite/server-ce
|
Packagist |
< 0.11.1
|
0.11.1
|
References
Frequently Asked Questions
What is CVE-2021-23682?
Which Litespeed.js versions are affected?
What version fixes CVE-2021-23682?
Is litespeed.js affected?
Is appwrite/server-ce affected?
What is the CVSS score of CVE-2021-23682?
What CWE is associated with CVE-2021-23682?
How can I check npm dependencies for CVE-2021-23682?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v9p9-535w-4285",
"modified" : "2022-02-25T15:40:33Z",
"published" : "2022-02-17T00:00:32Z",
"aliases" : [ "CVE-2021-23682" ],
"summary" : "Prototype Pollution in litespeed.js and appwrite/server-ce",
"details" : "This affects the package litespeed.js before 0.3.12; the package appwrite/server-ce from 0.12.0 and before 0.12.2, before 0.11.1. When parsing the query string in the getJsonFromUrl function, the key that is set in the result object is not properly sanitized leading to a Prototype Pollution vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "litespeed.js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "appwrite/server-ce"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.12.0"
}, {
"fixed" : "0.12.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "appwrite/server-ce"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.11.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23682"
}, {
"type" : "WEB",
"url" : "https://github.com/appwrite/appwrite/pull/2778"
}, {
"type" : "WEB",
"url" : "https://github.com/litespeed-js/litespeed.js/pull/18"
}, {
"type" : "WEB",
"url" : "https://github.com/appwrite/appwrite/releases/tag/0.11.1"
}, {
"type" : "WEB",
"url" : "https://github.com/appwrite/appwrite/releases/tag/0.12.2"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-JS-LITESPEEDJS-2359250"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-PHP-APPWRITESERVERCE-2401820"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-02-17T23:35:34Z",
"nvd_published_at" : "2022-02-16T17:15:00Z"
}
}