CVE-2024-34273: Njwt Njwt Prototype Pollution Vulnerability Vulnerability
HIGHCVE-2024-34273 is a HIGH (CVSS 5.9) njwt prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Njwt libraries in the npm ecosystem. The issue involves njwt prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 2.0.1.
CVE-2024-34273 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-34273
To remediate this vulnerability, upgrade all affected Njwt 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 njwt@2.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls njwt
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-34273, inspect your project dependencies using npm:
npm ls njwt
Analyze the terminal output to locate any version of Njwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.1), your application is affected.
Note: The npm ls njwt 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 Njwt, 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-34273 Affected Njwt Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
njwt
|
npm |
< 2.0.1
|
2.0.1
|
References
Frequently Asked Questions
What is CVE-2024-34273?
Which Njwt versions are affected?
What version fixes CVE-2024-34273?
Is njwt affected?
What is the CVSS score of CVE-2024-34273?
What CWE is associated with CVE-2024-34273?
How can I check npm dependencies for CVE-2024-34273?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3hvj-2783-34x2",
"modified" : "2024-11-18T16:26:42Z",
"published" : "2024-05-16T18:30:31Z",
"aliases" : [ "CVE-2024-34273" ],
"summary" : "njwt Prototype Pollution vulnerability",
"details" : "njwt up to v0.4.0 was discovered to contain a prototype pollution in the `Parser.prototype.parse` method.",
"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:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "njwt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34273"
}, {
"type" : "WEB",
"url" : "https://github.com/jwtk/njwt/issues/105"
}, {
"type" : "WEB",
"url" : "https://github.com/jwtk/njwt/commit/ec9483b6eec1150d56f772ddd308c2bbdf2f98f4"
}, {
"type" : "WEB",
"url" : "https://github.com/chrisandoryan/vuln-advisory/blob/main/nJwt/CVE-2024-34273.md"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jwtk/njwt"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-08-02T16:01:47Z",
"nvd_published_at" : "2024-05-16T16:15:08Z"
}
}