CVE-2022-3602
High · 7.5CVSS
7.5
EPSS
90.8%
Published
Nov 1, 2022
CISA due date
—
Cloudanix analysis
A flaw in widely used encryption software can let a malicious certificate crash affected applications, so systems using vulnerable versions should be updated promptly.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This is a stack-based buffer overflow in OpenSSL 3.0.x certificate validation, reached during X.509 name constraints processing after certificate chain signature checks. A malicious certificate containing a specially crafted email address can cause OpenSSL to overwrite four attacker-controlled bytes on the stack. In practical terms, the most likely impact is process crash and denial of service; remote code execution is theoretically possible but is reduced by common compiler and platform protections such as stack canaries, ASLR, non-executable stacks, and favorable stack layout. The issue affects applications using OpenSSL 3.0.0 through 3.0.6, including software that embeds or links affected OpenSSL versions such as impacted Node.js builds. It can be triggered on TLS clients that connect to a malicious server presenting a malicious certificate, and on TLS servers only when the server requests or requires client certificate authentication and validates a malicious client certificate.
Why it matters to the business
Successful exploitation can interrupt services that depend on affected OpenSSL certificate verification, causing application crashes, failed outbound integrations, degraded API availability, or denial of service against TLS endpoints that use mutual TLS. The vulnerability received high public attention and has a high EPSS score, so exposed or widely deployed OpenSSL 3.0.x components should be treated as a priority even though it is not listed in CISA KEV and no ransomware association is indicated. Organizations using Node.js or other software bundles built against vulnerable OpenSSL versions may have indirect exposure even if OpenSSL is not installed as a standalone package.
How an attack unfolds
An attacker first identifies an application that performs certificate validation using OpenSSL 3.0.0 through 3.0.6. For a client-side target, the attacker operates or compromises a TLS server and presents a certificate chain that reaches the vulnerable name constraints code path, with a crafted email address field in the certificate. The client connects to the malicious server and performs certificate verification. For a server-side target, the attacker connects to a TLS service that requests client certificate authentication and supplies a malicious client certificate. The vulnerable OpenSSL code processes the X.509 name constraints and triggers a stack overflow. Depending on the platform and build protections, the process may terminate immediately, causing denial of service, or in less likely circumstances the attacker may gain control over execution flow. Exploitation requires a malicious certificate accepted far enough into verification to reach name constraints checking, either because a CA signed it or because the application continues verification after failing to build a trusted chain.
How to fix it
Upgrade all affected OpenSSL 3.0.x deployments to OpenSSL 3.0.7 or later. For Node.js source or embedded builds that include the vulnerable OpenSSL code, update to a Node.js version or source revision that incorporates the fix; the provided fixed Node.js Git revision is 8c1dd95f3cc5d91acb9ce8994b3ac45ab927178f. Rebuild and redeploy statically linked applications, containers, appliances, language runtimes, and vendor packages that bundle OpenSSL rather than relying only on operating system package updates. If immediate patching is not possible, reduce exposure by disabling mutual TLS client certificate authentication where not required, restricting which peers can present client certificates, avoiding outbound TLS connections to untrusted destinations from vulnerable clients, and ensuring certificate verification failures are not ignored or bypassed. Mitigations should be considered temporary; patching is the primary corrective action.
How to confirm the fix worked
Confirm the runtime OpenSSL version used by each application, not only the system OpenSSL package. Use commands such as `openssl version -a`, application-specific version reporting, package metadata, container image scans, and binary dependency inspection to verify OpenSSL 3.0.7 or later is in use. For Node.js, verify the Node.js release or build includes the fixed OpenSSL code, and where source tracking is used, confirm inclusion of commit 8c1dd95f3cc5d91acb9ce8994b3ac45ab927178f or an equivalent upstream fix. Restart services after updating shared libraries and rebuild statically linked artifacts. Validate that TLS clients and services using client certificate authentication still complete normal certificate validation after the update. Exposure remains if any deployed process, container, appliance, or bundled runtime still reports OpenSSL 3.0.0 through 3.0.6.
Typical attack path
- Identify software using OpenSSL 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, or 3.0.6, including embedded runtimes such as affected Node.js builds.
- Determine whether the target acts as a TLS client connecting to attacker-controlled servers, or as a TLS server that requests client certificate authentication.
- Create or obtain a certificate chain that reaches OpenSSL name constraint validation and includes a maliciously crafted email address field.
- For client-side exploitation, lure or cause the application to initiate a TLS connection to an attacker-controlled endpoint presenting the malicious certificate.
- For server-side exploitation, connect to the target service and present the malicious certificate during client certificate authentication.
- Trigger vulnerable X.509 name constraint processing in OpenSSL.
- Cause the application process to crash, or attempt more advanced exploitation where platform protections and stack layout allow code execution.
How to detect it
Look for evidence of attempted exploitation in TLS-facing application logs, reverse proxy logs, mutual TLS authentication logs, endpoint crash telemetry, core dumps, and system journals. For client-side exposure, review outbound TLS connection logs shortly before unexplained crashes, especially connections to unusual, newly seen, or attacker-controlled destinations. For server-side exposure, focus on services that request client certificates and inspect handshake failures involving unusual client certificates or certificate name constraint errors. On Linux, check syslog, journald, kernel logs, coredumpctl, application supervisor logs, and container runtime logs for segmentation faults in processes linked to OpenSSL 3.0.x. In crash dumps or stack traces, look for OpenSSL X.509, name constraint, email address, and punycode processing functions. For Node.js services, inspect application crash logs and process manager output for abrupt exits during TLS handshakes or certificate verification. Because there is no single reliable network IOC for this vulnerability, treat clusters of TLS certificate validation errors followed by process crashes as suspicious and preserve malicious certificates, packet captures, and core dumps for analysis.
- OpenSSL 3.0.0
- OpenSSL 3.0.1
- OpenSSL 3.0.2
- OpenSSL 3.0.3
- OpenSSL 3.0.4
- OpenSSL 3.0.5
- OpenSSL 3.0.6
- OpenSSL 3.0.7
- ossl_punycode_decode
- ossl_a2ulabel
- X509_check_email
- NAME_CONSTRAINTS_check
- NAME_CONSTRAINTS_check_CN
- X509_verify_cert
- permitted subtree violation
- excluded subtree violation
- name constraints
- certificate verify failed
- segfault
- Segmentation fault
- SIGSEGV
- core dumped
- coredumpctl
- client certificate
- tlsv1 alert unknown ca
- bad certificate
- 8c1dd95f3cc5d91acb9ce8994b3ac45ab927178f
What your security team should do
- Prioritize inventory of OpenSSL 3.0.x usage across servers, endpoints, containers, CI/CD images, appliances, and embedded runtimes such as Node.js.
- Patch or rebuild all software using OpenSSL 3.0.0 through 3.0.6 to OpenSSL 3.0.7 or later, prioritizing internet-facing services, mutual TLS endpoints, and systems that make outbound TLS connections to untrusted destinations.
- Do not assume operating system patching fixes statically linked or bundled OpenSSL copies; scan application binaries and container layers for embedded vulnerable versions.
- Review TLS services that request client certificates and restrict client certificate authentication to trusted networks or known partners until patching is complete.
- Review applications that ignore certificate validation errors and correct that behavior, because continuing verification after trust-chain failure can increase reachability of the vulnerable code path.
- Monitor for abnormal process crashes, segmentation faults, TLS handshake failures, and certificate validation errors around services using OpenSSL 3.0.x.
- Use the high EPSS score as a prioritization signal despite the lack of KEV listing, because public awareness and broad dependency reach make delayed remediation risky.
The record
A buffer overrun can be triggered in X.509 certificate verification, specifically in name constraint checking. Note that this occurs after certificate chain signature verification and requires either a CA to have signed the malicious certificate or for the application to continue certificate verification despite failure to construct a path to a trusted issuer. An attacker can craft a malicious email address to overflow four attacker-controlled bytes on the stack. This buffer overflow could result in a crash (causing a denial of service) or potentially remote code execution. Many platforms implement stack overflow protections which would mitigate against the risk of remote code execution. The risk may be further mitigated based on stack layout for any given platform/compiler. Pre-announcements of CVE-2022-3602 described this issue as CRITICAL. Further analysis based on some of the mitigating factors described above have led this to be downgraded to HIGH. Users are still encouraged to upgrade to a new version as soon as possible. In a TLS client, this can be triggered by connecting to a malicious server. In a TLS server, this can be triggered if the server requests client authentication and a malicious client connects. Fixed in OpenSSL 3.0.7 (Affected 3.0.0,3.0.1,3.0.2,3.0.3,3.0.4,3.0.5,3.0.6).
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| crates.io | openssl-src | 300.0.0 | 300.0.11 |
| AlmaLinux:9 | openssl | 0 | 1:3.0.1-43.el9_0 |
| AlmaLinux:9 | openssl-devel | 0 | 1:3.0.1-43.el9_0 |
| AlmaLinux:9 | openssl-libs | 0 | 1:3.0.1-43.el9_0 |
| AlmaLinux:9 | openssl-perl | 0 | 1:3.0.1-43.el9_0 |
| Alpine:v3.15 | openssl3 | 0 | 3.0.7-r0 |
| Alpine:v3.16 | openssl3 | 0 | 3.0.7-r0 |
| Alpine:v3.17 | nodejs | 0 | 18.12.1-r0 |
| Alpine:v3.17 | openssl | 0 | 3.0.7-r0 |
| Alpine:v3.18 | nodejs | 0 | 18.12.1-r0 |
| Alpine:v3.18 | openssl | 0 | 3.0.7-r0 |
| Alpine:v3.19 | nodejs | 0 | 18.12.1-r0 |
| Alpine:v3.19 | openssl | 0 | 3.0.7-r0 |
| Alpine:v3.20 | nodejs | 0 | 18.12.1-r0 |
| Alpine:v3.20 | openssl | 0 | 3.0.7-r0 |
| Alpine:v3.21 | nodejs | 0 | 18.12.1-r0 |
| Alpine:v3.21 | openssl | 0 | 3.0.7-r0 |
| Alpine:v3.22 | nodejs | 0 | 18.12.1-r0 |
| Alpine:v3.22 | openssl | 0 | 3.0.7-r0 |
| Bitnami | node | 18.0.0 | 18.11.0 |
| Bitnami | node-min | 18.0.0 | 18.11.0 |
| Chainguard | libcrypto3 | 0 | 3.0.7-r0 |
| Chainguard | libssl3 | 0 | 3.0.7-r0 |
| Chainguard | openssl | 0 | 3.0.7-r0 |
| Chainguard | openssl-config | 0 | 3.0.7-r0 |
| Chainguard | openssl-dbg | 0 | 3.0.7-r0 |
| Chainguard | openssl-dev | 0 | 3.0.7-r0 |
| Chainguard | openssl-doc | 0 | 3.0.7-r0 |
| Chainguard | openssl-engine-afalg | 0 | 3.0.7-r0 |
| Chainguard | openssl-engine-capi | 0 | 3.0.7-r0 |
| Chainguard | openssl-engine-loader-attic | 0 | 3.0.7-r0 |
| Chainguard | openssl-engine-padlock | 0 | 3.0.7-r0 |
| Chainguard | openssl-provider-fips | 0 | 3.0.8-r0 |
| Chainguard | openssl-provider-legacy | 0 | 3.0.7-r0 |
| Chainguard | ruby-3.1 | 0 | 0 |
| Chainguard | ruby-3.1-base | 0 | 0 |
| Chainguard | ruby-3.1-base-dev | 0 | 0 |
| Chainguard | ruby-3.1-dev | 0 | 0 |
| Chainguard | ruby-3.1-doc | 0 | 0 |
| Debian:12 | openssl | 0 | 3.0.7-1 |
| Debian:13 | openssl | 0 | 3.0.7-1 |
| Linux | Kernel | b653db77350c7307a513b81856fe53e94cf42446 | No fix |
| Red Hat:enterprise_linux:9::appstream | openssl | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::appstream | openssl-debuginfo | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::appstream | openssl-debugsource | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::appstream | openssl-devel | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::appstream | openssl-libs | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::appstream | openssl-libs-debuginfo | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::appstream | openssl-perl | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::baseos | openssl | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::baseos | openssl-debuginfo | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::baseos | openssl-debugsource | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::baseos | openssl-devel | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::baseos | openssl-libs | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::baseos | openssl-libs-debuginfo | 0 | 1:3.0.1-43.el9_0 |
| Red Hat:enterprise_linux:9::baseos | openssl-perl | 0 | 1:3.0.1-43.el9_0 |
| Rocky Linux:9 | openssl | 0 | 1:3.0.1-43.el9_0 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP4 | openssl-3 | 0 | 3.0.1-150400.4.11.1 |
| Ubuntu:18.04:LTS | openssl | 0 | 1.1.1-1ubuntu2.1~18.04.20 |
| Ubuntu:20.04:LTS | openssl | 0 | 1.1.1f-1ubuntu2.16 |
| Ubuntu:22.04:LTS | openssl | 0 | 3.0.2-0ubuntu1.7 |
| Ubuntu:Pro:16.04:LTS | edk2 | 0 | No fix |
| Wolfi | libcrypto3 | 0 | 3.0.7-r0 |
| Wolfi | libssl3 | 0 | 3.0.7-r0 |
| Wolfi | openssl | 0 | 3.0.7-r0 |
| Wolfi | openssl-config | 0 | 3.0.7-r0 |
| Wolfi | openssl-dbg | 0 | 3.0.7-r0 |
| Wolfi | openssl-dev | 0 | 3.0.7-r0 |
| Wolfi | openssl-doc | 0 | 3.0.7-r0 |
| Wolfi | openssl-engine-afalg | 0 | 3.0.7-r0 |
| Wolfi | openssl-engine-capi | 0 | 3.0.7-r0 |
| Wolfi | openssl-engine-loader-attic | 0 | 3.0.7-r0 |
| Wolfi | openssl-engine-padlock | 0 | 3.0.7-r0 |
| Wolfi | openssl-provider-legacy | 0 | 3.0.7-r0 |
| Wolfi | ruby-3.1 | 0 | 0 |
| Wolfi | ruby-3.1-base | 0 | 0 |
| Wolfi | ruby-3.1-base-dev | 0 | 0 |
| Wolfi | ruby-3.1-dev | 0 | 0 |
| Wolfi | ruby-3.1-doc | 0 | 0 |
| cargo | openssl-src | 300.0.0 | 300.0.11 |
| conan | openssl | 3.0.0 | 3.0.7 |
| openSUSE:Leap 15.4 | openssl-3 | 0 | 3.0.1-150400.4.11.1 |
| openSUSE:Tumbleweed | cargo-audit-advisory-db | 0 | 20221102-1.1 |
| openSUSE:Tumbleweed | openssl-3 | 0 | 3.0.7-1.1 |
| openSUSE:Tumbleweed | python-cryptography | 0 | 38.0.3-1.1 |
| openSUSE:Tumbleweed | python-cryptography | 0 | 44.0.0-1.1 |
| openSUSE:Tumbleweed | python-cryptography-vectors | 0 | 44.0.0-1.1 |
| openSUSE:Tumbleweed | python-mitmproxy | 0 | 11.1.2-1.1 |
Related vulnerabilities
- CVE-2022-3786 A buffer overrun can be triggered in X.509 certificate verification, specifically in name… Also affects openssl-src
- CVE-2022-0778 The BN_mod_sqrt() function, which computes a modular square root, contains a bug that can… Also affects openssl-src
- CVE-2021-3712 ASN.1 strings are represented internally within OpenSSL as an ASN1_STRING structure which… Also affects openssl-src
- CVE-2021-3449 An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello… Also affects openssl-src
- CVE-2021-3450 The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates… Also affects openssl-src
- CVE-2021-23840 Calls to EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate may overflow the… Also affects openssl-src
- CVE-2020-1967 Server or client applications that call the SSL_check_chain() function during or after a… Also affects openssl-src
- CVE-2024-12797 Issue summary: Clients using RFC7250 Raw Public Keys (RPKs) to authenticate a server may… Also affects openssl