/

CVE-2026-101916

Severity:

HIGH RISK

(7.4)

Improper Certificate Validation (CWE-295) in gRPC-JS

CVE-2026-101916

Deferred

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Authentication Bypass and Unauthorized Access

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A certificate validation flaw in @grpc/grpc-js can cause getAuthContext to treat an unauthorized peer certificate as authorized when client certificates are optional. Applications that rely on this authentication context may incorrectly grant access to clients presenting certificates that were not authorized, particularly in configurations using gRPC xDS RBAC authentication.

Affected context

The issue occurs in gRPC servers that use @grpc/grpc-js credentials with requireClientCertificate set to false and then rely on getAuthContext to make authorization decisions. The risk is higher when downstream application logic or gRPC xDS RBAC uses the returned certificate status without independently distinguishing authenticated peers from peers whose certificates were not authorized.

Exploit preconditions

  • Attack surface: A gRPC service accepting TLS connections from network clients
  • Required access: Network access to a vulnerable gRPC endpoint; valid client credentials may not be required
  • Trigger point: Authentication-context evaluation after a peer presents an unauthorized certificate while client certificates are optional
  • Why exploitation is possible: The authentication context can incorrectly represent an unauthorized certificate as authorized, allowing dependent authorization logic to make an unsafe access decision

Why this happens

The underlying bug is improper certificate validation and identity-state handling. When optional client certificates are configured, the implementation does not clearly distinguish a certificate that is authorized from one that is merely present but unauthorized. This maps to CWE-295: Improper Certificate Validation, because security-sensitive application logic can receive and trust an authentication result that does not accurately reflect certificate authorization.

Potential impact

  • An attacker could gain access to gRPC methods or resources intended for authorized clients
  • Applications may make incorrect identity or role decisions
  • RBAC policies could be bypassed in affected xDS authentication configurations
  • Sensitive data or administrative functionality could be exposed
  • Compromised authorization decisions could enable further service abuse

General mitigation guidance

Mitigation generally focuses on ensuring that certificate presence, certificate validity, and certificate authorization are evaluated as separate security decisions.

Common defensive patterns include:

  • Use TLS configurations that require client certificates where mutual authentication is expected
  • Treat authentication-context fields as untrusted until their authorization meaning is explicitly verified
  • Enforce certificate issuer, subject, SAN, trust-chain, and policy checks at a clearly defined authorization boundary
  • Apply deny-by-default authorization rules when client identity cannot be conclusively established
  • Avoid granting privileges solely because a peer certificate is present
  • Run services with least privilege so an authorization error has limited consequences
  • Keep dependency and security-policy baselines maintained through controlled release processes

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis and dependency review for use of getAuthContext in authorization decisions
  • Code review signals where certificate presence or authentication metadata is treated as proof of authorization
  • Tests covering unauthorized, expired, untrusted, and absent client certificates when optional client authentication is enabled
  • Integration tests confirming that xDS RBAC denies unauthorized certificate identities
  • Policy enforcement requiring explicit mutual-TLS and identity-validation behavior for protected gRPC services
  • Runtime monitoring for successful requests from certificate subjects or issuers that should not be authorized

Automated code review and software composition analysis tools may help identify affected dependency usage and unsafe authentication assumptions.

Sources

SourceLink
github.comgithub.com/grpc/grpc-node/commit/2a84ec8b01b9db68ed9d2b117a53a81449edb8ee
github.comgithub.com/grpc/grpc-node/commit/b4e0079c6d22a2adedfcac748e0bc083f783bc7c
github.comgithub.com/grpc/grpc-node/releases/tag/@grpc/grpc-js%401.14.5
github.comgithub.com/grpc/grpc-node/security/advisories/GHSA-m9gg-hp2v-232j

Frequently asked

questions

Yes, it can be reachable over the network when an attacker can connect to an affected gRPC endpoint and the service relies on the flawed authentication context for authorization.

Not necessarily. The key condition is an optional-client-certificate configuration in which an unauthorized certificate can be interpreted as authorized. The exact access requirements depend on the service's TLS and network exposure.

Ensure that client-certificate authorization is explicitly and correctly enforced before identity or RBAC decisions are made, and require client certificates for services that depend on mutual TLS.

Test all certificate states, separate authentication from authorization, use deny-by-default policies, review authentication-context consumers, and maintain controlled dependency security updates.

Find out what's already
exploitable in your codebase.