Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

protobufjs

Latest version: v8.8.1

Overview

Last scanned
11 Oct 2026
Published
11 Oct 2026
npm package Publisher: dcode, fenster, google-wombot
10,601 Stars
1,847 Forks
3 Versions
400.8M Downloads
JavaScript Repo language

Scan summary

protobufjs was last scanned on 11 Oct 2026 at version 8.8.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 3 versions; the latest was published on 11 Oct 2026.
  • Findings: No rules fired in version 8.8.1.
  • Downloads: 400,839,915 downloads.

Versions

3 versions published
Versions and the rules that fired in each
VersionPublishedStatus
8.8.1 LATEST 11 Oct 2026 No rules fired
7.6.6 27 Aug 2026 No rules fired
8.7.2 8 Aug 2026 Not shown

No rules fired in 8.8.1

Findings

Findings for v8.8.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 8.8.1; other versions have their own rules, not their own score.

Known vulnerabilities

17 CVEs · last 8 Jul 2026

2 CRITICAL 8 HIGH 7 MEDIUM 0 LOW

Versions

  • ≥ 8.6.6
  • ≥ 8.6.5, < 8.6.6 1 HIGH
  • ≥ 8.6.0, < 8.6.5 1 HIGH 1 MEDIUM
  • ≥ 8.5.0, < 8.6.0 1 HIGH 2 MEDIUM
  • ≥ 8.4.1, < 8.5.0 1 HIGH 3 MEDIUM
  • ≥ 8.2.0, < 8.4.1 2 HIGH 3 MEDIUM
  • ≥ 8.0.2, < 8.2.0 3 HIGH 1 MEDIUM
  • ≥ 8.0.1, < 8.0.2 7 HIGH 4 MEDIUM
  • ≥ 8.0.0, < 8.0.1 1 CRITICAL 7 HIGH 4 MEDIUM
  • ≥ 7.6.5, < 8.0.0
Show all 26 version ranges
  • ≥ 7.6.3, < 7.6.5 1 HIGH
  • ≥ 7.6.1, < 7.6.3 1 HIGH 1 MEDIUM
  • ≥ 7.5.8, < 7.6.1 2 HIGH 1 MEDIUM
  • ≥ 7.5.6, < 7.5.8 3 HIGH 1 MEDIUM
  • ≥ 7.5.5, < 7.5.6 7 HIGH 4 MEDIUM
  • ≥ 7.5.0, < 7.5.5 1 CRITICAL 7 HIGH 4 MEDIUM
  • ≥ 7.2.5, < 7.5.0 1 CRITICAL 6 HIGH 4 MEDIUM
  • ≥ 7.0.0, < 7.2.5 2 CRITICAL 6 HIGH 4 MEDIUM
  • ≥ 6.11.6, < 7.0.0 6 HIGH 4 MEDIUM
  • ≥ 6.11.4, < 6.11.6 1 CRITICAL 6 HIGH 4 MEDIUM
  • ≥ 6.11.3, < 6.11.4 2 CRITICAL 6 HIGH 4 MEDIUM
  • ≥ 6.11.0, < 6.11.3 2 CRITICAL 7 HIGH 4 MEDIUM
  • ≥ 6.10.3, < 6.11.0 2 CRITICAL 6 HIGH 4 MEDIUM
  • ≥ 6.10.0, < 6.10.3 2 CRITICAL 7 HIGH 4 MEDIUM
  • ≥ 6.8.6, < 6.10.0 1 CRITICAL 6 HIGH 4 MEDIUM
  • < 6.8.6 1 CRITICAL 6 HIGH 5 MEDIUM

Vulnerabilities

  • CVE-2026-59877 High 8 Jul 2026 protobufjs: protobufjs: Denial of Service via crafted .proto schema Fixed in 7.6.5, 8.6.6
  • CVE-2026-59876 Medium 8 Jul 2026 protobufjs: protobufjs: Prototype pollution vulnerability in Text Format extension Fixed in 8.6.5
  • CVE-2026-54270 Medium 22 Jun 2026 protobufjs: protobufjs: Denial of Service due to excessive memory consumption Fixed in 8.5.0
  • CVE-2026-54269 Medium 22 Jun 2026 protobufjs: protobufjs-cli: protobufjs: Denial of Service due to name collision with runtime helpers Fixed in 7.6.3, 8.6.0
  • CVE-2026-48712 High 22 Jun 2026 protobufjs: protobufjs: Denial of Service via uncontrolled recursion with crafted protobuf payload Fixed in 7.6.1, 8.4.1
  • CVE-2026-45740 High 13 May 2026 protobufjs: protobufjs: Denial of Service via crafted JSON descriptors Fixed in 7.5.8, 8.2.0
  • CVE-2026-44294 Medium 13 May 2026 protobufjs: protobufjs: Denial of Service due to unescaped control characters in field names Fixed in 7.5.6, 8.0.2
  • CVE-2026-44293 High 13 May 2026 protobufjs: protobufjs: Arbitrary code execution due to unsafe expression generation from crafted protobuf descriptors Fixed in 7.5.6, 8.0.2
  • CVE-2026-44292 Medium 13 May 2026 protobufjs: protobufjs: Data integrity impact due to prototype pollution Fixed in 7.5.6, 8.0.2
  • CVE-2026-44291 High 13 May 2026 protobufjs: protobufjs: Arbitrary Code Execution via prototype pollution Fixed in 7.5.6, 8.0.2
  • CVE-2026-44290 High 13 May 2026 protobufjs: protobufjs: Denial of Service via crafted schema Fixed in 7.5.6, 8.0.2
  • CVE-2026-44289 High 13 May 2026 protobufjs: protobufjs: Denial of Service via uncontrolled recursion in protobuf decoding Fixed in 7.5.6, 8.0.2
  • CVE-2026-44288 Medium 13 May 2026 protobufjs: protobufjs: Security control bypass due to improper handling of overlong UTF-8 sequences Fixed in 7.5.6, 8.0.2
  • CVE-2026-41242 Critical 18 Apr 2026 protobufjs: protobufjs: Arbitrary code execution via injected protobuf definition type fields Fixed in 8.0.1, 7.5.5, 6.11.6
  • CVE-2023-36665 Critical 5 Jul 2023 protobufjs: prototype pollution using user-controlled protobuf message Fixed in 7.2.5, 6.11.4
  • CVE-2022-25878 High 27 May 2022 protobufjs: Prototype Pollution via util.setProperty or ReflectionObject.setParsedOption methods Fixed in 6.11.3, 6.10.3
  • CVE-2018-3738 Medium 7 Jun 2018 Denial of Service Fixed in 6.8.6, 5.0.3, 5.0.3 <6.0.0

Seal Security (npm)

Seal Security ships a patched build of this package. Its fixed versions:

  • CVE-2026-144580: 6.10.1-sp999, 6.10.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.4-sp999, 7.2.5-sp999, 7.3.0-sp999, 7.4.0-sp999, 7.5.4-sp999, 7.5.5-sp999, 7.5.7-sp999, 7.5.9-sp999, 7.6.0-sp999, 7.6.3-sp999, 7.6.4-sp999
  • CVE-2026-41242: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999
  • CVE-2026-44288: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-44289: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-44290: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-44291: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-44292: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-44293: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-44294: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-45740: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp2, 7.3.2-sp999, 7.5.4-sp2
  • CVE-2026-48712: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp999, 7.3.0-sp2, 7.3.2-sp999, 7.4.0-sp999, 7.5.4-sp2, 7.5.7-sp2
  • CVE-2026-54269: 6.10.1-sp999, 6.10.2-sp999, 6.11.2-sp999, 6.11.3-sp999, 7.0.0-sp999, 7.2.3-sp999, 7.2.4-sp999, 7.2.5-sp999, 7.3.0-sp2, 7.3.2-sp999, 7.4.0-sp999, 7.5.4-sp2, 7.5.7-sp2
  • CVE-2026-59877: 7.5.4-sp2, 7.5.7-sp2

README

The publisher’s own README, as collected from the registry.

protobuf.js is a very fast, conformant, and unusually versatile JavaScript implementation of Protocol Buffers for Node.js and browsers. It is independently maintained with contributions from the upstream Protocol Buffers project, works with .proto schemas without requiring protoc, and supports runtime reflection as well as specialized code generation with matching TypeScript declarations.

If protobuf.js is important to your project or organization, or if you depend on it commercially, consider supporting its ongoing maintenance. Sponsorship helps make bug fixes, releases, LTS/security handling, and user support more sustainable.

Getting started

Getting up and running is simple: Install the package, load a schema, and you are all set to encode and decode Protobuf messages. From there, protobuf.js grows with your requirements: Add code generation with TypeScript declarations, transport-agnostic services, support for text-based formats, and more as needed.

Install
npm install protobufjs

The command line utility for generating reflection bundles, static code and TypeScript declarations is published as an add-on package:

npm install --save-dev protobufjs-cli

The CLI is a JS-native protobuf.js toolchain that does not require setting up protoc. If you prefer a protoc-based workflow, it provides protoc-gen-pbjs as an option.

Browser builds

Canonical browser builds are provided via the jsDelivr CDN, supporting CommonJS, AMD and global window.protobuf. Make sure to pin an exact version in production.

Usage

The examples below use this schema:

syntax = "proto3";

package awesomepackage;

message AwesomeMessage {
  string awesome_field = 1;
}

protobuf.js converts .proto field names to camelCase by default, so awesome_field is used as awesomeField in JavaScript. Use the keepCase option when loading or parsing .proto files to preserve field names as written.

Load a schema
const protobuf = require("protobufjs");

const root = await protobuf.load("awesome.proto");
const AwesomeMessage = root.lookupType("awesomepackage.AwesomeMessage");

Optionally use load() with a callback, or loadSync() for synchronous loading on Node.js. Imports resolve relative to the importing file by default. To resolve imports against a specific base directory, create a Root and override root.resolvePath before calling root.load().

Encode and decode
const payload = { awesomeField: "hello" };

// Optionally create a message instance from already valid data
const message = AwesomeMessage.create(payload);

const encoded = AwesomeMessage.encode(message).finish();
const decoded = AwesomeMessage.decode(encoded);

encode expects a message instance or equivalent plain object and does not verify input implicitly. Use create to create a message instance from already valid data when useful, verify for plain objects whose shape is not guaranteed, and fromObject when conversion from broader JavaScript objects is needed.

Plain objects can be encoded directly when they already use protobuf.js runtime types: numbers for 32-bit numeric fields, booleans for bool, strings for string, Uint8Array or Buffer for bytes, arrays for repeated fields, and plain objects for maps. Map keys are the string representation of the respective value or an 8-character hash string for 64-bit keys.

Note that, as with any structured binary format, decoded structures incur runtime memory overhead beyond their encoded representation. Applications processing untrusted input should therefore apply appropriate input-size and concurrency limits to bound memory use. For this reason, unknown fields present on the wire are intentionally discarded as the safer default, but can be retained by setting reader.discardUnknown = false per reader, or by setting Reader.discardUnknown = false to make it the default for subsequently created readers. Preserved unknown field data can also be explicitly dropped with delete message.$unknowns.

Convert plain objects

Conversion is an explicit interoperability boundary. fromObject accepts common JavaScript inputs such as enum values by name, base64 bytes, decimal 64-bit strings, Long, and BigInt; toObject lets callers choose the output expected by their application or transport.

const message = AwesomeMessage.fromObject({ awesomeField: 42 });
const object = AwesomeMessage.toObject(message, {
  longs: String,
  enums: String,
  bytes: String
});

Common ConversionOptions are:

Option Effect
longs: BigInt Converts 64-bit values to bigint values
longs: String Converts 64-bit values to decimal strings
longs: Number Converts 64-bit values to JS numbers (may lose precision)
enums: String Converts enum values to names
bytes: String Converts bytes to base64 strings
defaults: true Includes default values for unset fields
arrays: true Includes empty arrays for repeated fields
objects: true Includes empty objects for map fields
oneofs: true Includes virtual oneof discriminator properties

Message API

Message types expose focused methods for validation, conversion, and binary I/O.

  • encode(message: Message | object, writer?: Writer): Writer\ Encodes a message or equivalent plain object. Call .finish() on the returned writer to obtain a buffer.

  • encodeDelimited(message: Message | object, writer?: Writer): Writer\ Encodes a length-delimited message.

  • decode(reader: Reader | Uint8Array): Message\ Decodes a message from protobuf binary data.

  • decodeDelimited(reader: Reader | Uint8Array): Message\ Decodes a length-delimited message.

  • create(properties?: object): Message\ Creates a message instance from already valid data.

  • verify(object: object): null | string\ Checks whether a plain object can be encoded as-is. Returns null if valid, otherwise an error message.

  • fromObject(object: object): Message\ Converts broader JavaScript input into a message instance.

  • toObject(message: Message, options?: ConversionOptions): object\ Converts a message instance to a configurable plain JavaScript object.

  • message.toJSON(): object\ Converts a message instance to JSON-compatible output using default conversion options.

Message instances provide stable runtime identity for testing with instanceof.

Length-delimited methods read and write a varint byte length before the message, which is useful for streams and framed protocols.

If required fields are missing while decoding proto2 data, decode throws protobuf.util.ProtocolError with the partially decoded message available as err.instance.

Code generation

Use protobufjs-cli to generate schema-specific code, either directly with pbjs or through the optional protoc-gen-pbjs plugin for protoc.

protobuf.js offers two code-generation modes, both with matching TypeScript declarations: reflection modules generate optimized code at runtime with reflection metadata retained; static modules generate reflection-free code ahead of time. Both use the same runtime package and automatically import only the runtime capabilities they need.

Target Output Runtime entry
json-module Reflection module protobufjs/light.js (without parser)
static-module Static code module protobufjs/minimal.js (without reflection)

Module targets support --wrap default for CommonJS and AMD, plus esm, commonjs, amd, and closure; --wrap can also load a custom wrapper module.

Static modules

Static modules emit dedicated, reflection-free JavaScript code for your schema.

npx pbjs -t static-module -w esm -o awesome.js --dts awesome.proto
import { awesomepackage } from "./awesome.js";

const message = awesomepackage.AwesomeMessage.create({ awesomeField: "hello" });

Static code is repetitive by design, but compresses unusually well with Brotli or gzip and works in CSP-restricted environments.

Reflection modules

Reflection modules wrap schemas as compact JSON metadata while avoiding .proto parsing at runtime.

npx pbjs -t json-module -w esm -o awesome.js --dts awesome.proto
import { awesomepackage } from "./awesome.js";

const AwesomeMessage = awesomepackage.AwesomeMessage;

Declarations for reflection modules mirror static-module typings. Because JSON modules export reflection objects, message instances should be created with MyMessage.create(...) rather than constructors. Code using create(...) works with static modules as well. Separately, -t json can serialize reflection metadata as bare JSON bundles for use with load() or Root.fromJSON().

TypeScript integration

protobuf.js works with TypeScript out of the box: its runtime API is typed, and generated code can be paired with matching TypeScript declarations in a single CLI invocation. Declarations are strongly typed, including discriminated unions for oneofs and scoped types for plain-object usage:

message Profile {
  oneof contact {
    string email = 1;
    string phone = 2;
  }
}
const profile = Profile.create({
  contact: "email",
  email: "hello@example.com"
});

if (profile.contact === "email") {
  profile.email; // string
}

const decoded = Profile.decode(bytes);
if (decoded.contact === "phone") {
  decoded.phone; // string
}

The same narrowed shape is available for plain-object inputs:

const object: Profile.$Shape = {
  contact: "email",
  email: "hello@example.com"
};

Advanced usage

Programmatic schemas

Schemas can be constructed directly through reflection:

const AwesomeMessage = new protobuf.Type("AwesomeMessage")
  .add(new protobuf.Field("awesomeField", 1, "string"));

const root = new protobuf.Root()
  .define("awesomepackage")
  .add(AwesomeMessage);
Custom message classes

A reflected type can use a custom class as its runtime constructor:

class AwesomeMessage extends protobuf.Message<AwesomeMessage> {
  awesomeField = "";

  constructor(properties?: protobuf.Properties<AwesomeMessage>) {
    super(properties);
    // ...
  }

  customInstanceMethod() {
    return this.awesomeField.toLowerCase();
  }
}

root.lookupType("awesomepackage.AwesomeMessage").ctor = AwesomeMessage;

const decoded = AwesomeMessage.decode(bytes);
decoded.customInstanceMethod(); // string

protobuf.js will populate the constructor with the usual static runtime methods and use it for decoded messages. When assigning constructors manually, add the type to its parent namespace/root first if fields reference other reflected types. In TypeScript, custom members are visible when using the custom class type in consuming code.

Services

protobuf.js supports service clients built from service definitions. The service API is transport-agnostic: provide an rpcImpl function to connect it to HTTP, WebSocket, gRPC, or another transport.

function myRpcImpl(method, requestData, callback) {
  // method.name
  // method.path
  // method.requestStream?
  // method.responseStream?
  performRequest(requestData, function(err, responseData) {
    callback(err, responseData);
  });
}

const myService = MyService.create(myRpcImpl/*, requestDelimited?, responseDelimited? */);

See examples/streaming-rpc.js for a streaming example.

See examples/grpc-service.js for an integration example with @grpc/grpc-js.

Extensions

The following extensions provide descriptor conversion and text-based protobuf formats when reflection metadata is available. Most applications only need the binary APIs above.

Descriptors

protobuf.js uses a compact JSON-based reflection representation internally. See ext/descriptor for use cases that need conversion between reflected roots and protoc descriptor messages.

ProtoJSON

Protocol Buffers support a special ProtoJSON format to share data with systems that do not support the binary wire format, for example when implementing gateways. Spec-compliant ProtoJSON is supported via ext/protojson.

Text Format

Protocol Buffers Text Format is a special syntax for representing protobuf data in text form, which can be useful for configurations or tests. Spec-compliant Text Format is supported via ext/textformat.

Conformance

protobuf.js is validated against the official Protocol Buffers conformance suite. It passes all required and recommended tests for the Proto2, Proto3 and Editions binary wire formats, with complete ProtoJSON and Text Format support available as optional extensions when those formats are needed.

Category Total Required Recommended
Binary 100.00% (2835/2835) 100.00% (1958/1958) 100.00% (877/877)
↳ Proto2 100.00% (707/707) 100.00% (489/489) 100.00% (218/218)
↳ Proto3 100.00% (707/707) 100.00% (486/486) 100.00% (221/221)
↳ Editions 100.00% (1421/1421) 100.00% (983/983) 100.00% (438/438)
ProtoJSON 100.00% (2814/2814) 100.00% (2362/2362) 100.00% (452/452)
TextFormat 100.00% (909/909) 100.00% (845/845) 100.00% (64/64)
Overall 100.00% (6558/6558) 100.00% (5165/5165) 100.00% (1393/1393)
Edition Supported since
2023 v7.5.0
2024 v8.0.0
2026 v8.8.0

Structured results of the conformance tests are also available as CI artifacts.

Performance

protobuf.js's reflection and static modes share the same code-generation backend and underlying hand-tuned reader and writer primitives. Reflection mode emits specialized encoders and decoders just in time, while static mode emits equivalent code ahead of time.

To see how this architecture compares in practice, the repository includes a reproducible benchmark suite measuring both modes alongside other general-purpose JavaScript implementations across three cases: our classic common message shape and two unmodified, structurally distinct fixtures sourced from other implementations. Each library is tested through its recommended serialization and deserialization path using identical schemas and message contents.

Implementation Common Vector tile Buf perf
protobuf.js static 5.28M ops/s   1.0x 3.06K ops/s   1.0x 49.2K ops/s   1.0x
protobuf.js reflect 5.16M ops/s   1.0x 3.08K ops/s   1.0x 47.5K ops/s   1.0x
JSON 3.44M ops/s   1.5x 1.50K ops/s   2.1x 7.13K ops/s   6.9x
protoc-gen-js 1.05M ops/s   5.0x 691 ops/s   4.5x 15.0K ops/s   3.3x
protoc-gen-es 1.22M ops/s   4.3x 1.14K ops/s   2.7x 35.8K ops/s   1.4x

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm protobufjs

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229