CVE-2026-126367

@grpc/grpc-js: safe_regex incorrectly applies partial string matching for patterns with alternation

Published Nov 12, 2026 CVSS 3.1 · 4.8 Medium EPSS < 1% KEV · Not listed
Description
@grpc/grpc-js implements the core functionality of gRPC purely in JavaScript, without a C++ addon. Before 1.13.2, and from 1.14.0 through 1.14.1, the @grpc/grpc-js-xds SafeRegexValueMatcher and PathSafeRegexValueMatcher add start and end anchors without grouping a supplied top-level alternation. An expression intended to match one of several complete values can therefore match a prefix, substring, or suffix. The affected matchers are used for route selection, xDS credential identity matching, and RBAC URL path, principal name, server name, and header rules. An ALLOW policy using an alternation can consequently accept a method, certificate identity, or header value outside the intended set, while a DENY policy becomes broader rather than permissive. This issue is fixed in versions 1.13.2 and 1.14.2.

Analysis

AI-generated

Technical impact

The vulnerability lies in how @grpc/grpc-js applies start and end anchors to user‑supplied regular expressions that contain top‑level alternation. Because the alternation is not grouped, the matcher may accept a prefix, substring, or suffix of a target value. This behavior allows an attacker to craft values that match an ALLOW policy even though they are not explicitly permitted, or to bypass a DENY policy that would otherwise block them. The flaw therefore undermines the integrity of access controls across route selection, xDS credential identity matching, and RBAC URL/path, principal name, server name, and header rules.

Affected Systems

The affected component is the grpc-node project, specifically the @grpc/grpc-js-xds SafeRegexValueMatcher and PathSafeRegexValueMatcher classes. All releases before 1.13.2, and the 1.14.x line up through 1.14.1, are affected. The mistake occurs during the construction of regular expressions used to enforce routing and policy decisions within gRPC services implemented in JavaScript.

Risk and Exploitability

The CVSS score of 4.8 indicates moderate severity, while the EPSS score of < 1% suggests that it is unlikely to be widely exploited at present. The vulnerability is not listed in CISA’s KEV catalog. Exploitation would involve sending crafted gRPC requests that exploit the over‑matching regex to gain unauthorized access or bypass denial rules. An attacker would need to understand the vulnerable pattern to construct an appropriate request, making the attack feasible but non‑trivial.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade @grpc/grpc-js to version 1.13.2 or later; the fix is applied in 1.13.2 and 1.14.2.
  • If running 1.14.0 or 1.14.1, upgrade to 1.14.2, which contains the same patch as 1.13.2.
  • If upgrade is unavailable, modify ALLOW and DENY policies to avoid regex alternation or explicitly anchor patterns to prevent partial matches and mitigate the risk temporarily.

Generated by OpenCVE AI on November 14, 2026 at 21:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-r7hq-q2xm-6c5m @grpc/grpc-js: safe_regex incorrectly applies partial string matching for patterns with alternation
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Grpc
Grpc grpc-node
Vendors & Products Grpc
Grpc grpc-node
Type Values Removed Values Added
Description @grpc/grpc-js implements the core functionality of gRPC purely in JavaScript, without a C++ addon. Before 1.13.2, and from 1.14.0 through 1.14.1, the @grpc/grpc-js-xds SafeRegexValueMatcher and PathSafeRegexValueMatcher add start and end anchors without grouping a supplied top-level alternation. An expression intended to match one of several complete values can therefore match a prefix, substring, or suffix. The affected matchers are used for route selection, xDS credential identity matching, and RBAC URL path, principal name, server name, and header rules. An ALLOW policy using an alternation can consequently accept a method, certificate identity, or header value outside the intended set, while a DENY policy becomes broader rather than permissive. This issue is fixed in versions 1.13.2 and 1.14.2.
Title @grpc/grpc-js: safe_regex incorrectly applies partial string matching for patterns with alternation
Weaknesses CWE-625
CWE-863
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N'}

Weaknesses
  • CWE-625

    Permissive Regular Expression

  • CWE-863

    Incorrect Authorization

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 17, 2026, 12:23 PM
Reserved
Nov 10, 2026, 9:12 PM
Status
Received
Published
Nov 13, 2026, 12:20 AM
Modified
Nov 17, 2026, 1:17 PM