CVE-2024-34273: Njwt Njwt Prototype Pollution Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-3hvj-2783-34x2
CVSS 5.9
CWE-1321
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2024-34273
GHSA Identifier GHSA-3hvj-2783-34x2
Severity HIGH
CVSS v3.1 Base Score 5.9
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Njwt
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (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.

njwt fixed: 2.0.1
npm install njwt@2.0.1
Verify Direct and Transitive Dependencies

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

njwt up to v0.4.0 was discovered to contain a prototype pollution in the `Parser.prototype.parse` method.

CVE-2024-34273 Affected Njwt Versions

1 component(s)
Fixed Versions:
2.0.1
Product / Package Ecosystem Affected Versions Fixed Version
njwt
npm
< 2.0.1
2.0.1

References

Frequently Asked Questions

What is CVE-2024-34273?
CVE-2024-34273 is a security vulnerability in Njwt involving njwt Prototype Pollution vulnerability under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Njwt versions are affected?
Affected versions include releases prior to 2.0.1 across affected packages: njwt.
What version fixes CVE-2024-34273?
Upgrading to 2.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is njwt affected?
Yes, njwt is affected in releases prior to 2.0.1. Upgrade your dependency to 2.0.1 or later.
What is the CVSS score of CVE-2024-34273?
CVE-2024-34273 has a CVSS v3.1 base score of 5.9 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-34273?
CVE-2024-34273 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (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.).
How can I check npm dependencies for CVE-2024-34273?
Run the dependency tree command: 'npm ls njwt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}