CVE-2026-59877: protobufjs Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-j3f2-48v5-ccww
CVSS 5.3
CWE-835
Published
Advisory Summary

CVE-2026-59877 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting protobufjs libraries in the npm ecosystem. The issue involves denial of service via infinite loop in .proto option parsing. Remediation is available by upgrading affected packages to version 7.6.5, 8.6.6.

CVE-2026-59877 at a Glance

CVE Identifier CVE-2026-59877
GHSA Identifier GHSA-j3f2-48v5-ccww
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product protobufjs
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-59877

To remediate this vulnerability, upgrade all affected protobufjs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

protobufjs fixed: 7.6.5
npm install protobufjs@7.6.5
protobufjs fixed: 8.6.6
npm install protobufjs@8.6.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls protobufjs

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-59877, inspect your project dependencies using npm:

npm ls protobufjs

Analyze the terminal output to locate any version of protobufjs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.6.5), your application is affected.

Note: The npm ls protobufjs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In protobufjs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary protobufjs parsed option names by advancing through schema tokens until it reached an `=` token, without checking for end of input. A crafted `.proto` schema that opens an option declaration but ends prematurely could cause the option parser to loop without ever terminating. This affects the reflection parsing path (`parse`, `Root.load`, `Root.loadSync`). ## Impact An attacker who can provide or influence `.proto` schema text parsed by an application may be able to cause the parsing call to never return. Because Node.js is single-threaded, the blocked event loop prevents all other work in the process, resulting in a denial of service that persists until the process is externally terminated. Applications that only encode or decode protobuf binary data with trusted schemas are not directly affected. ## Preconditions - The application must parse `.proto` schema text influenced by an attacker. - The schema must be parsed through APIs such as `parse`, `Root.load`, or `Root.loadSync`. - The crafted input must begin an option declaration that ends before its `=` assignment. ## Workarounds Do not parse `.proto` schemas from untrusted sources with affected versions. If untrusted schema text must be accepted, isolate parsing in a process or worker that can be safely terminated and bound it with a timeout, so a non-returning parse call cannot deny service to the rest of the application.

CVE-2026-59877 Affected protobufjs Versions

2 component(s)
Fixed Versions:
7.6.58.6.6
Product / Package Ecosystem Affected Versions Fixed Version
protobufjs
npm
≥ 7.5.0
< 7.6.5
7.6.5
protobufjs
npm
≥ 8.0.0
< 8.6.6
8.6.6

References

Frequently Asked Questions

What is CVE-2026-59877?
CVE-2026-59877 is a security vulnerability in protobufjs involving Denial of Service via infinite loop in .proto option parsing under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which protobufjs versions are affected?
Affected versions include releases prior to 7.6.5, 8.6.6 across affected packages: protobufjs.
What version fixes CVE-2026-59877?
Upgrading to 7.6.5, 8.6.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is protobufjs affected?
Yes, protobufjs is affected in releases prior to 7.6.5, 8.6.6. Upgrade your dependency to 7.6.5, 8.6.6 or later.
What is the CVSS score of CVE-2026-59877?
CVE-2026-59877 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-59877?
CVE-2026-59877 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check npm dependencies for CVE-2026-59877?
Run the dependency tree command: 'npm ls protobufjs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j3f2-48v5-ccww",
  "modified" : "2026-07-20T22:03:00Z",
  "published" : "2026-07-20T22:03:00Z",
  "aliases" : [ "CVE-2026-59877" ],
  "summary" : "protobufjs: Denial of Service via infinite loop in .proto option parsing",
  "details" : "## Summary\n\nprotobufjs parsed option names by advancing through schema tokens until it reached an `=` token, without checking for end of input. A crafted `.proto` schema that opens an option declaration but ends prematurely could cause the option parser to loop without ever terminating.\n\nThis affects the reflection parsing path (`parse`, `Root.load`, `Root.loadSync`).\n\n## Impact\n\nAn attacker who can provide or influence `.proto` schema text parsed by an application may be able to cause the parsing call to never return. Because Node.js is single-threaded, the blocked event loop prevents all other work in the process, resulting in a denial of service that persists until the process is externally terminated.\n\nApplications that only encode or decode protobuf binary data with trusted schemas are not directly affected.\n\n## Preconditions\n\n- The application must parse `.proto` schema text influenced by an attacker.\n- The schema must be parsed through APIs such as `parse`, `Root.load`, or `Root.loadSync`.\n- The crafted input must begin an option declaration that ends before its `=` assignment.\n\n## Workarounds\n\nDo not parse `.proto` schemas from untrusted sources with affected versions. If untrusted schema text must be accepted, isolate parsing in a process or worker that can be safely terminated and bound it with a timeout, so a non-returning parse call cannot deny service to the rest of the application.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "protobufjs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.5.0"
      }, {
        "fixed" : "7.6.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.6.4"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "protobufjs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.6.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 8.6.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-j3f2-48v5-ccww"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59877"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/pull/2352"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/commit/10fba6d54815ceecca8a06b9a6db490c8f5d2217"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/commit/fa5c73add738ceb471e74da8cc2f3727c3d0a69f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/protobufjs/protobuf.js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-v7.6.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-v8.6.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-20T22:03:00Z",
    "nvd_published_at" : "2026-07-08T16:16:34Z"
  }
}