CVE-2022-21656
NixOS vulnerability analysis and mitigation

Overview

CVE-2022-21656 is a certificate authentication bypass vulnerability discovered in Envoy proxy that affects versions 1.20.1 and earlier. The vulnerability was disclosed on February 22, 2022, and was patched in version 1.20.2. The issue allows malformed certificates issued by a malicious Certificate Authority (CA) to be accepted as valid for a host due to improper Subject Alternative Name (SAN) type validation (GitHub Advisory).

Technical details

The vulnerability stems from the API for matching Subject Alternative Names in X.509 certificates not considering the Subject Alternative Name type during validation. This oversight allows a malicious CA to issue malformed certificates by encoding data in incorrect SAN types (e.g., encoding a DNS hostname within an rfc822Name SAN or an email address within a uniformResourceIndicator SAN). Such malformed certificates could successfully match against configured names, potentially bypassing nameConstraints that restrict which DNS hostnames or email addresses a CA may issue for. The vulnerability has been assigned a CVSS v3.1 score of 3.1 (Low) with the vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N (GitHub Advisory).

Impact

The vulnerability could enable monster-in-the-middle attacks for Envoy users that rely on the X.509 nameConstraints extension to restrict CA capabilities. This particularly affects users of common, commercially-available CAs that use nameConstraints to technically constrain subordinate CAs. Organizations using enterprise-managed CAs without nameConstraints restrictions may be less impacted, as they already fully trust their CAs (GitHub Advisory).

Mitigation and workarounds

The vulnerability was patched in Envoy version 1.20.2. Users must replace all usage of 'matchsubjectaltnames' with 'matchtypedsubjectalt_names' to ensure proper validation of Subject Alternative Name types and nameConstraints. No workarounds are available for unpatched versions (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management