CVE-2022-4742: Prototype Pollution in json-pointer

json-pointer Updated 02 Oct 2025

Summary

26/12/2022
Yes i
Critical
9.8

CVE-2022-4742: json-pointer vulnerable to Prototype Pollution. Affects json-pointer versions < 0.6.2. Fixed in 0.6.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

json-pointer is an npm package that provides a set of functions for working with JSON Pointers. JSON Pointers are used to reference specific values within a JSON document. The package is widely used in JavaScript applications to manipulate and access JSON data. Unfortunately, json-pointer is vulnerable to a critical security issue known as Prototype Pollution.

Vulnerability Detail

The vulnerability in json-pointer arises from improper handling of user-controlled input in the 'set' function of the index.js file. This allows an attacker to manipulate the object prototype attributes, leading to Prototype Pollution. Prototype Pollution is a type of vulnerability where an attacker can modify the behavior of existing objects or introduce new properties into the prototype chain. This can have severe consequences, such as remote code execution or unauthorized access to sensitive data. The vulnerability has been assigned the identifier CVE-2022-4742 and has a CVSS score of 9.8 (Critical).

How To Fix

Latest published version: 0.6.2 as of 23 Oct 2026

npm install json-pointer@0.6.2

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to update the json-pointer package to the fixed version as soon as possible.

Conclusion

The json-pointer package is vulnerable to Prototype Pollution, which can have severe consequences for the security of your application. It is crucial to update the package to version 0.6.2 or later to mitigate this vulnerability. If you need further assistance or support in remediating this vulnerability, you can reach out to DevNack.com.

See every vulnerability recorded for json-pointer →

Share this vulnerability

FAQ

json-pointer is an npm package used for working with JSON Pointers, which are used to reference specific values within a JSON document.

Prototype Pollution is a vulnerability that allows an attacker to modify the behavior of existing objects or introduce new properties into the prototype chain.

The consequences of this vulnerability can range from remote code execution to unauthorized access to sensitive data.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply provide your package-lock.json file, and Vulert will analyze it for open-source vulnerabilities in real-time.

Related vulnerabilities

Recent vulnerabilities recorded for json-pointer.

How To Fix

Latest published version: 0.6.2 as of 23 Oct 2026

npm install json-pointer@0.6.2

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback