CVE-2026-59876: protobufjs Vulnerability in Text Format Parsing Leading to Prototype Manipulation

protobufjs Updated 21 Jul 2026

Summary

20/07/2026
Yes i
Moderate
4.8

CVE-2026-59876: protobufjs: Text Format string map parsing can mutate returned map object prototype. Affects protobufjs versions >= 8.2.0, < 8.6.5. Fixed in 8.6.5. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

protobufjs is a popular JavaScript library used for encoding and decoding Protocol Buffers, a language-neutral, platform-neutral extensible mechanism for serializing structured data. It provides a range of functionalities, including support for binary encoding and decoding, as well as a text format extension for easier human readability. However, a vulnerability exists in the text format parsing that allows for unintended prototype manipulation, which can lead to security issues if not addressed.

Vulnerability Detail

The vulnerability arises from the way protobuf.js handles string-keyed map entries in its text format extension. Specifically, when parsing input, if an attacker provides a key named 'proto', it can alter the prototype of the returned map object instead of creating a new map entry. This can lead to per-object prototype mutation, which may have serious implications if downstream application logic treats inherited properties as meaningful. The impact is contingent upon the application's handling of these properties, potentially allowing attackers to manipulate application behavior.

How To Fix

Latest published version: 8.8.1 as of 23 Oct 2026

npm install protobufjs@8.8.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

8.6.5

This is the first release that contains the fix.

npm install protobufjs@8.6.5

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

Workaround

If an immediate upgrade is not feasible, avoid parsing untrusted protobuf Text Format input with affected versions. Additionally, reject any string map keys named 'proto' before or during parsing. Use own-property checks when accessing parsed map objects, as shown in the following code snippet:

if (Object.hasOwnProperty.call(map, key)) {
    // Safe to access map[key]
}

Conclusion

The vulnerability CVE-2026-59876 in protobufjs poses a risk of prototype manipulation through improper handling of text format input. It is crucial for developers to upgrade to the patched version or implement workarounds to safeguard their applications from potential exploitation.

See every vulnerability recorded for protobufjs →

Share this vulnerability

FAQ

The vulnerability allows an attacker to manipulate the prototype of a returned map object by providing a key named 'proto' in the text format input.

If your application processes untrusted protobuf text format input and relies on inherited properties from parsed map objects, it may lead to unexpected behavior or security issues.

Versions of protobufjs prior to 8.6.5 are affected by this vulnerability.

Upgrade to protobufjs version 8.6.5 or newer to mitigate the vulnerability. If an upgrade is not possible, implement workarounds to avoid parsing untrusted input.

You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software by analyzing your package-lock.json. You can also check if your application is affected by this vulnerability using the Vulert playground without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for protobufjs.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 8.8.1 as of 23 Oct 2026

npm install protobufjs@8.8.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

8.6.5

This is the first release that contains the fix.

npm install protobufjs@8.6.5

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