CVE-2026-42789: CWE-295 Improper Certificate Validation in Erlang OTP
Improper Following of a Certificate's Chain of Trust vulnerability in Erlang OTP public_key (pubkey_cert module) allows a non-CA certificate to be accepted as an intermediate issuer, enabling certificate chain forgery. In lib/public_key/src/pubkey_cert.erl, pubkey_cert:validate_extensions/7 contains two flaws that together allow a certificate with basicConstraints cA:false and no keyUsage extension to be used as an intermediate issuer in a chain passed to public_key:pkix_path_validation/3: the cA:false clause recurses into the remaining extensions without rejecting the certificate when it is in issuer position, and the keyUsage check only fires when the extension is present, so a certificate lacking keyUsage entirely bypasses the keyCertSign enforcement. Any party holding an end-entity certificate with basicConstraints cA:false and no keyUsage extension, issued by any CA in the victim's trust store, can use that certificate's private key to sign forged leaf certificates for arbitrary identities. public_key:pkix_path_validation/3 accepts the resulting chain, and by extension every TLS or mTLS endpoint built on the OTP ssl application that relies on the default verifier is affected, including server identity verification on the client side and client certificate verification on mTLS servers. This issue affects OTP from OTP 17.0 before OTP 29.0.1, OTP 28.5.0.1, OTP 27.3.4.12 and OTP 26.2.5.21, corresponding to public_key from 0.22 before 1.21.1, 1.20.3.1, 1.17.1.3 and 1.15.1.7.
AI Analysis
Technical Summary
The vulnerability CVE-2026-42789 in Erlang OTP's public_key (pubkey_cert module) arises from improper following of a certificate's chain of trust. The function pubkey_cert:validate_extensions/7 fails to reject certificates with basicConstraints cA:false and no keyUsage extension when used as intermediate issuers. This allows an attacker with an end-entity certificate issued by a trusted CA to use its private key to sign forged leaf certificates for arbitrary identities. The public_key:pkix_path_validation/3 function accepts these forged chains, affecting TLS and mTLS endpoints relying on the OTP ssl application's default verifier. The issue affects OTP versions from 17.0 before 29.0.1, including specific versions 28.5.0.1, 27.3.4.12, and 26.2.5.21, corresponding to public_key versions before 1.21.1, 1.20.3.1, 1.17.1.3, and 1.15.1.7. Red Hat has issued security advisories and patches addressing this vulnerability.
Potential Impact
An attacker who possesses an end-entity certificate with basicConstraints cA:false and no keyUsage extension, issued by any CA trusted by the victim, can exploit this vulnerability to forge certificate chains. This enables the attacker to create forged leaf certificates for arbitrary identities that are accepted by the vulnerable certificate validation process. Consequently, TLS and mTLS endpoints relying on the default verifier in Erlang OTP's ssl application are susceptible to impersonation and man-in-the-middle attacks. This undermines the trust model of certificate-based authentication and can lead to unauthorized access or interception of communications.
Mitigation Recommendations
A patch addressing this vulnerability is available and should be applied promptly. Red Hat has released updated Erlang packages for affected products, including Red Hat OpenStack Services on OpenShift 18.0, which fix this issue. Users should follow vendor guidance and apply the official updates as described in the Red Hat advisory (https://access.redhat.com/errata/RHSA-2026:39809). Since this is a vulnerability in a cloud service component, vendors typically manage remediation for cloud-hosted services; users should verify with their service providers. No alternative mitigations are indicated by the vendor advisory.
CVE-2026-42789: CWE-295 Improper Certificate Validation in Erlang OTP
Description
Improper Following of a Certificate's Chain of Trust vulnerability in Erlang OTP public_key (pubkey_cert module) allows a non-CA certificate to be accepted as an intermediate issuer, enabling certificate chain forgery. In lib/public_key/src/pubkey_cert.erl, pubkey_cert:validate_extensions/7 contains two flaws that together allow a certificate with basicConstraints cA:false and no keyUsage extension to be used as an intermediate issuer in a chain passed to public_key:pkix_path_validation/3: the cA:false clause recurses into the remaining extensions without rejecting the certificate when it is in issuer position, and the keyUsage check only fires when the extension is present, so a certificate lacking keyUsage entirely bypasses the keyCertSign enforcement. Any party holding an end-entity certificate with basicConstraints cA:false and no keyUsage extension, issued by any CA in the victim's trust store, can use that certificate's private key to sign forged leaf certificates for arbitrary identities. public_key:pkix_path_validation/3 accepts the resulting chain, and by extension every TLS or mTLS endpoint built on the OTP ssl application that relies on the default verifier is affected, including server identity verification on the client side and client certificate verification on mTLS servers. This issue affects OTP from OTP 17.0 before OTP 29.0.1, OTP 28.5.0.1, OTP 27.3.4.12 and OTP 26.2.5.21, corresponding to public_key from 0.22 before 1.21.1, 1.20.3.1, 1.17.1.3 and 1.15.1.7.
CVSS v4.0
Score 7.0high
Affected software
pkg:github/erlang/otpRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-42789 in Erlang OTP's public_key (pubkey_cert module) arises from improper following of a certificate's chain of trust. The function pubkey_cert:validate_extensions/7 fails to reject certificates with basicConstraints cA:false and no keyUsage extension when used as intermediate issuers. This allows an attacker with an end-entity certificate issued by a trusted CA to use its private key to sign forged leaf certificates for arbitrary identities. The public_key:pkix_path_validation/3 function accepts these forged chains, affecting TLS and mTLS endpoints relying on the OTP ssl application's default verifier. The issue affects OTP versions from 17.0 before 29.0.1, including specific versions 28.5.0.1, 27.3.4.12, and 26.2.5.21, corresponding to public_key versions before 1.21.1, 1.20.3.1, 1.17.1.3, and 1.15.1.7. Red Hat has issued security advisories and patches addressing this vulnerability.
Potential Impact
An attacker who possesses an end-entity certificate with basicConstraints cA:false and no keyUsage extension, issued by any CA trusted by the victim, can exploit this vulnerability to forge certificate chains. This enables the attacker to create forged leaf certificates for arbitrary identities that are accepted by the vulnerable certificate validation process. Consequently, TLS and mTLS endpoints relying on the default verifier in Erlang OTP's ssl application are susceptible to impersonation and man-in-the-middle attacks. This undermines the trust model of certificate-based authentication and can lead to unauthorized access or interception of communications.
Mitigation Recommendations
A patch addressing this vulnerability is available and should be applied promptly. Red Hat has released updated Erlang packages for affected products, including Red Hat OpenStack Services on OpenShift 18.0, which fix this issue. Users should follow vendor guidance and apply the official updates as described in the Red Hat advisory (https://access.redhat.com/errata/RHSA-2026:39809). Since this is a vulnerability in a cloud service component, vendors typically manage remediation for cloud-hosted services; users should verify with their service providers. No alternative mitigations are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-04-29T18:06:33.251Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
- Is Cloud Service
- true
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-42789","vendor":"Red Hat"}]
Threat ID: 6a16f9d5e29bf47b50c0e93d
Added to database: 05/27/2026, 14:04:05 UTC
Last enriched: 07/30/2026, 03:32:27 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 58
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.