Skip to main content
EPSS 0.3%top 74%

CVE-2026-42789: CWE-295 Improper Certificate Validation in Erlang OTP

0
High
VulnerabilityCVE-2026-42789cvecve-2026-42789cwe-295cwe-296gcve
Published: 05/27/2026 (05/27/2026, 12:23:06 UTC)
Source: CVE Database V5
Vendor/Project: Erlang
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
High
Subsq. Integrity
High
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:H/SI:H/SA:N

Affected software

Erlang

OTP

Affected versions
>=0.22 <1.15.1.7

Erlang

OTP

Affected versions
>=17.0 <26.2.5.21
GitHub Actionsmore threats →ai
erlang/otp
pkg:github/erlang/otp
Affected versions
=0.22<26.2.5.21<27.3.4.12<28.5.0.1<29.0.1
GitHub Actionsmore threats →cve
public_key
pkg:github/public_key
Affected versions
>=0.22 <1.15.1.7
GitHub Actionsmore threats →cve
erlang/otp
pkg:github/erlang/otp
Affected versions
>=17.0 <26.2.5.21
CPE configurations
cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/14/2026, 13:09:07 UTC

Technical Analysis

The vulnerability (CWE-295) exists in Erlang OTP's public_key module, specifically in the pubkey_cert:validate_extensions/7 function. It fails to properly reject certificates with basicConstraints cA:false and no keyUsage extension when used as intermediate issuers in a certificate chain. This flaw allows an attacker holding an end-entity certificate from a trusted CA to forge leaf certificates by exploiting the improper chain validation in public_key:pkix_path_validation/3. The issue compromises server and client identity verification in TLS and mutual TLS connections. Red Hat has issued advisories and patches addressing this vulnerability, particularly for Red Hat OpenStack Services on OpenShift 18.0.

Potential Impact

This vulnerability allows an attacker with an existing end-entity certificate issued by a trusted CA to forge leaf certificates for arbitrary identities. This undermines the trust model of TLS and mTLS connections by compromising server and client identity verification. Applications relying on Erlang OTP's default certificate verifier may accept forged certificates, potentially leading to spoofing and man-in-the-middle attacks. The impact is rated as Important (high severity) by Red Hat, with a CVSS score of 7.0, indicating significant risk to confidentiality and integrity.

Mitigation Recommendations

A patch is available and should be applied to affected systems. Red Hat has released updated Erlang packages addressing this vulnerability, particularly for Red Hat OpenStack Services on OpenShift 18.0. Users should update to the fixed versions as detailed in the Red Hat advisory (RHSA-2026:39809). No effective mitigations other than applying the official patch are currently available or meet Red Hat's criteria for widespread deployment and stability.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
EEF
Date Reserved
2026-04-29T18:06:33.251Z
Cvss Version
4.0
State
PUBLISHED
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: 08/14/2026, 13:09:07 UTC

Last updated: 09/11/2026, 19:31:55 UTC

Views: 102

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses