Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-47778

CVE-2026-47778: Envoyproxy Envoy Certificate Validation Bypass

CVE-2026-47778 is a certificate validation bypass flaw in Envoyproxy Envoy caused by improper handling of NUL bytes in DNS SAN strings. This post covers technical details, affected versions, security impact, and mitigation.

Published:

CVE-2026-47778 Overview

CVE-2026-47778 affects Envoy, an open source edge and service proxy for cloud-native applications. The vulnerability resides in DefaultCertValidator::verifySubjectAltName, where an extracted DNS Subject Alternative Name (SAN) string is converted to a C-style string using .c_str() before validation. An attacker who serves a certificate containing an embedded NUL byte in the dNSName SAN can bypass certificate validation. Envoy truncates the SAN at the NUL byte during comparison against config_san, then routes upstream traffic based on the truncated match. The flaw is fixed in versions 1.35.11, 1.36.7, 1.37.3, and 1.38.1. The issue is categorized under [CWE-158] Improper Neutralization of Null Byte or NUL Character.

Critical Impact

An attacker with the ability to present a crafted TLS certificate can bypass Envoy SAN validation and gain unintended upstream routing access.

Affected Products

  • Envoy versions prior to 1.35.11
  • Envoy versions prior to 1.36.7
  • Envoy versions prior to 1.37.3 and 1.38.1

Discovery Timeline

  • 2026-06-26 - CVE-2026-47778 published to NVD
  • 2026-06-29 - Last updated in NVD database

Technical Details for CVE-2026-47778

Vulnerability Analysis

The flaw exists in Envoy's TLS certificate validation logic. The helper Utility::generalNameAsString correctly captures the complete DNS SAN string, including any embedded NUL bytes. However, DefaultCertValidator::verifySubjectAltName passes this string to Utility::dnsNameMatch() using .c_str(). The implicit conversion to absl::string_view inside dnsNameMatch invokes strlen(), which stops at the first NUL byte. This truncates the effective comparison length before matching against the configured SAN. Envoy then evaluates the truncated value against the exact-match config_san rule and returns true, treating the certificate as valid for upstream routing.

Root Cause

The root cause is a mismatch between two string representations. The captured SAN uses a length-prefixed container that preserves NUL bytes, while .c_str() produces a NUL-terminated C string. Downstream strlen()-based length inference silently drops any content after the NUL byte, causing the exact-match check to operate on an incomplete value.

Attack Vector

Exploitation requires an attacker to present a TLS certificate with a dNSName SAN containing an embedded NUL byte, formatted such that the pre-NUL prefix matches the config_san value expected by Envoy. Successful validation permits the attacker to route traffic to protected upstream services that should have rejected the certificate. Exploitation requires high attack complexity and high privileges, per the CVSS vector.

No public proof-of-concept exploit code is available. Refer to the Envoy GitHub Security Advisory GHSA-f8x4-rw5x-f3r7 for technical details.

Detection Methods for CVE-2026-47778

Indicators of Compromise

  • Presence of TLS client or peer certificates whose dNSName SAN entries contain embedded NUL (0x00) bytes.
  • Successful upstream connections through Envoy from peers whose certificate SAN, when parsed byte-accurately, does not equal the configured match_typed_subject_alt_names value.
  • Envoy access logs showing routing decisions to sensitive upstream clusters from peers that should have failed SAN validation.

Detection Strategies

  • Inspect TLS handshake captures for certificates whose SAN fields contain non-printable or NUL bytes and correlate with Envoy request logs.
  • Compare presented certificate SAN bytes with the length reported by strlen() to identify truncation-based bypass attempts.
  • Audit Envoy proxy versions across the fleet to identify instances running versions earlier than 1.35.11, 1.36.7, 1.37.3, or 1.38.1.

Monitoring Recommendations

  • Enable verbose TLS logging on Envoy listeners handling mutual TLS to record full peer certificate details.
  • Forward Envoy access and connection logs to a centralized analytics platform and alert on anomalous certificate metadata.
  • Track upstream cluster connection sources and flag mismatches between expected client identities and observed SAN values.

How to Mitigate CVE-2026-47778

Immediate Actions Required

  • Upgrade Envoy to 1.35.11, 1.36.7, 1.37.3, or 1.38.1 or later depending on the release branch in use.
  • Inventory all Envoy deployments including sidecars in service meshes such as Istio and update embedded Envoy binaries.
  • Review match_typed_subject_alt_names configurations and revoke or rotate any certificates suspected of containing embedded NUL bytes.

Patch Information

The Envoy project fixed CVE-2026-47778 in versions 1.35.11, 1.36.7, 1.37.3, and 1.38.1. Details and patch references are published in the Envoy GitHub Security Advisory GHSA-f8x4-rw5x-f3r7. The fix replaces the .c_str()-based comparison path with a length-preserving string handling flow that retains embedded NUL bytes during SAN evaluation.

Workarounds

  • Restrict which certificate authorities Envoy trusts for peer authentication to reduce the pool of attacker-controlled certificates.
  • Use short-lived, tightly scoped certificates issued by an internal CA that rejects SANs containing NUL or non-printable characters at issuance time.
  • Add upstream authorization checks that do not rely solely on Envoy's SAN validation, such as SPIFFE identity verification at the destination service.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.