CVE-2024-34273
JavaScript vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2024-34273) affects the nJwt library versions up to v0.4.0, specifically involving a prototype pollution vulnerability in the Parser.prototype.parse method. The issue was discovered and publicly disclosed on May 16, 2024 (NVD).

Technical details

The vulnerability exists in the Parser.prototype.parse method, which is called when verifying JWT tokens using nJwt.verify(token, signingKey). The issue specifically affects JwtHeader and JwtBody objects, which lack proper validation to prevent attributes from being assigned to the object prototype. The vulnerability has been assigned CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes) and has received a CVSS v3.1 base score of 5.9 (Medium) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD, GitHub Advisory).

Impact

The vulnerability allows attackers to override existing attributes with incompatible types, potentially causing application crashes or bypassing security checks. Attackers can create polluted attributes on every object inheriting from JwtBody and JwtHeader objects, and bypass reserved key restrictions in the JwtHeader object by modifying the prototype's reservedKeys array (GitHub Advisory).

Exploitability

The vulnerability can be exploited by creating a JWT token with specially crafted header and body contents that include proto objects. These objects can modify the prototype chain and bypass existing security checks. A proof of concept exists demonstrating the successful exploitation of this vulnerability (GitHub Advisory).

Mitigation and workarounds

The recommended mitigation is to either freeze the prototype or implement validation to check for prototype keywords (proto, constructor, and prototype). If these keywords are detected, the function should deny merging them into JwtBody and JwtHeader objects, thus preventing the prototype pollution vulnerability (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-88062CRITICAL9.5
  • JavaScript logoJavaScript
  • omniroute
NoNoSep 10, 2026
CVE-2026-61534CRITICAL9.1
  • JavaScript logoJavaScript
  • yayson
NoYesSep 11, 2026
CVE-2026-59973HIGH8.5
  • JavaScript logoJavaScript
  • @frontmcp/adapters
NoYesSep 11, 2026
CVE-2026-59960HIGH7.5
  • JavaScript logoJavaScript
  • @argos-ci/core
NoYesSep 10, 2026
CVE-2026-59965HIGH7.1
  • JavaScript logoJavaScript
  • @jhb.software/payload-alt-text-plugin
NoNoSep 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management