Vulnerabilities in pkg:npm/requirejs
PACKAGECVE-2024-38999 is a HIGH (CVSS 10.0) jrburke requirejs vulnerable to prototype vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Requirejs libraries in the npm ecosystem. The issue involves jrburke requirejs vulnerable to prototype pollution. Remediation is available by upgrading affected packages to version 2.3.7.
pkg:npm/requirejs
Vulnerability advisories affecting package pkg:npm/requirejs. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-x3m3-4wpv-5vgc | CVE-2024-38999 | HIGH | jrburke requirejs vulnerable to prototype pollution |
CVE-2024-38999 at a Glance
Security Impact
CVSS: 10.0
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:C/C:H/I:H/A:H).
How to Fix CVE-2024-38999
To remediate this vulnerability, upgrade all affected Requirejs 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 requirejs@2.3.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls requirejs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-38999, inspect your project dependencies using npm:
npm ls requirejs
Analyze the terminal output to locate any version of Requirejs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.7), your application is affected.
Note: The npm ls requirejs 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 Requirejs, 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-38999 Affected Requirejs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
requirejs
|
npm |
< 2.3.7
|
2.3.7
|
References
Frequently Asked Questions
What is CVE-2024-38999?
Which Requirejs versions are affected?
What version fixes CVE-2024-38999?
Is requirejs affected?
What is the CVSS score of CVE-2024-38999?
What CWE is associated with CVE-2024-38999?
How can I check npm dependencies for CVE-2024-38999?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x3m3-4wpv-5vgc",
"modified" : "2024-07-25T15:25:40Z",
"published" : "2024-07-01T15:32:19Z",
"aliases" : [ "CVE-2024-38999" ],
"summary" : "jrburke requirejs vulnerable to prototype pollution",
"details" : "jrburke requirejs v2.3.6 was discovered to contain a prototype pollution via the function `s.contexts._.configure`. This vulnerability allows attackers to execute arbitrary code or cause a Denial of Service (DoS) via injecting arbitrary properties.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "requirejs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.3.6"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-38999"
}, {
"type" : "WEB",
"url" : "https://github.com/requirejs/r.js/issues/1015"
}, {
"type" : "WEB",
"url" : "https://github.com/requirejs/requirejs/issues/1854"
}, {
"type" : "WEB",
"url" : "https://github.com/requirejs/requirejs/pull/1856/commits/ebd7a2ff71473542fa132d0d15c10fb4ed1539e1"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/mestrtee/9acae342285bd2998fa09ebcb1e6d30a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/requirejs/r.js"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-REQUIREJS-5416713"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-10T16:50:19Z",
"nvd_published_at" : "2024-07-01T13:15:05Z"
}
}