CVE-2026-44293: protobuf.js Code Injection via Unsafe Default Values in bytes Field

protobufjs Updated 12 May 2026

Summary

12/05/2026
Yes i
High
7.7

CVE-2026-44293: protobuf.js: Code injection through bytes field defaults in generated toObject code. Affects protobufjs across 2 version ranges.

< 7.5.6 >= 8.0.0, < 8.0.2

Fixed in 7.5.6 or 8.0.2, depending on the release line you run. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

protobuf.js is a popular JavaScript library used for encoding and decoding Protocol Buffers, a method developed by Google for serializing structured data. It allows developers to define data structures in a schema and provides tools to serialize and deserialize these structures efficiently. However, vulnerabilities in its handling of schema-controlled default values can lead to security risks, particularly code injection attacks.

Vulnerability Detail

The vulnerability arises from the way protobuf.js generates JavaScript code for the 'toObject' conversion function. If an attacker can control or influence the protobuf descriptor, they can define a 'bytes' field with a non-string default value. This can lead to the emission of unsafe expressions in the generated code, allowing the execution of arbitrary JavaScript in the context of the application using protobuf.js. The implications are severe, as it could lead to unauthorized code execution and potential system compromise.

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 versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 7.5.6 7.5.6
    npm install protobufjs@7.5.6
  • >= 8.0.0, < 8.0.2 8.0.2
    npm install protobufjs@8.0.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

Avoid loading protobuf schemas or JSON descriptors from untrusted sources. If you must accept untrusted schemas, validate or restrict field options before loading them, and consider running schema processing in an isolated environment.

Conclusion

The vulnerability CVE-2026-44293 in protobuf.js poses a significant risk due to potential code injection through unsafe default values in bytes fields. It is crucial for developers to update to the latest patched versions and implement recommended workarounds to mitigate risks.

See every vulnerability recorded for protobufjs →

Share this vulnerability

FAQ

CVE-2026-44293 is a vulnerability in protobuf.js that allows for code injection through unsafe default values in bytes fields.

An attacker can exploit this vulnerability by providing a crafted protobuf descriptor with a malicious default value for a bytes field, leading to arbitrary code execution.

Versions of protobuf.js up to 7.5.5 and 8.0.1 are affected by this vulnerability.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By checking your package-lock.json file, you can determine if your application is affected by this vulnerability.

If immediate updates are not possible, ensure that you do not load schemas from untrusted sources and validate any untrusted schemas before processing them.

Related vulnerabilities

Recent vulnerabilities recorded for protobufjs.

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 versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 7.5.6 7.5.6
    npm install protobufjs@7.5.6
  • >= 8.0.0, < 8.0.2 8.0.2
    npm install protobufjs@8.0.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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