CVE-2024-21528: Node gettext Node-gettext Vulnerable To Prototype Pollution Vulnerability
HIGHCVE-2024-21528 is a HIGH (CVSS 5.9) node-gettext vulnerable to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Node gettext libraries in the npm ecosystem. The issue involves node-gettext vulnerable to prototype pollution. Remediation is available in the latest vendor maintenance releases.
CVE-2024-21528 at a Glance
Security Impact
CVSS: 5.9
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:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-21528
To remediate this vulnerability, upgrade all affected Node gettext 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 node-gettext@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls node-gettext
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-21528, inspect your project dependencies using npm:
npm ls node-gettext
Analyze the terminal output to locate any version of Node gettext 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 node-gettext 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 Node gettext, 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-2024-21528 Affected Node gettext Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
node-gettext
|
npm |
≤ 3.0.0
|
|
References
Frequently Asked Questions
What is CVE-2024-21528?
Which Node gettext versions are affected?
What version fixes CVE-2024-21528?
Is node-gettext affected?
What is the CVSS score of CVE-2024-21528?
What CWE is associated with CVE-2024-21528?
How can I check npm dependencies for CVE-2024-21528?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g974-hxvm-x689",
"modified" : "2024-11-18T16:27:11Z",
"published" : "2024-09-10T06:30:48Z",
"aliases" : [ "CVE-2024-21528" ],
"summary" : "node-gettext vulnerable to Prototype Pollution",
"details" : "All versions of the package node-gettext are vulnerable to Prototype Pollution via the addTranslations() function in gettext.js due to improper user input sanitization.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "node-gettext"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21528"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/alexanderwallin/node-gettext"
}, {
"type" : "WEB",
"url" : "https://github.com/alexanderwallin/node-gettext/blob/65d9670f691c2eeca40dce129c95bcf8b613d344/lib/gettext.js#L113"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-NODEGETTEXT-6100943"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-09-10T15:52:56Z",
"nvd_published_at" : "2024-09-10T05:15:10Z"
}
}