# CVE-2026-42789: Non-CA certificate accepted as intermediate issuer in public_key path validation

> Attackers can forge TLS certificates by exploiting a validation flaw in Erlang OTP's public_key module, bypassing trust checks to impersonate identities.

- **Severity:** High 7.0 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 May 2026
- **Updated:** 14 Oct 2026
- **Also known as:** AZL-89172, DEBIAN-CVE-2026-42789, EEF-CVE-2026-42789, GHSA-c99q-jmpx-v8qq, UBUNTU-CVE-2026-42789

## What is CVE-2026-42789?

CVE-2026-42789 is a high-severity vulnerability in Erlang OTP, published on 27 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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 27.3.4.19, OTP 28.5.0.8, and OTP 29.1.2, corresponding to public_key from 0.22 before 1.17.1.7, 1.20.3.6, and 1.21.8. Whether OTP before OTP 17.0, corresponding to public_key before 0.22, is affected is unknown.

Weakness: CWE-296 (Improper Following of a Certificate's Chain of Trust), CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2026-42789?

It affects 1 product.


Products: Erlang Erlang\/Otp.

## How do I fix CVE-2026-42789?

Upgrade to a fixed version.

## Is CVE-2026-42789 being exploited?

There is no known exploitation of CVE-2026-42789 in the wild and no public exploit code.

## Other vulnerabilities in Erlang OTP

- [CVE-2022-37026](https://insights.sbomify.com/CVE-2022-37026/): Auth bypass in n/a (critical 9.8)
- [CVE-2016-10253](https://insights.sbomify.com/CVE-2016-10253/): Memory corruption in n/a (critical 9.8)
- [CVE-2026-55953](https://insights.sbomify.com/CVE-2026-55953/): TLS 1.2 and DTLS client accepts unoffered anonymous cipher suite, bypassing server authentication (critical 9.1)
- [CVE-2026-49759](https://insights.sbomify.com/CVE-2026-49759/): Stack buffer overflow in SCTP error cause parsing in inet_drv allows remote VM crash (high 8.8)
- [CVE-2026-58227](https://insights.sbomify.com/CVE-2026-58227/): TLS/DTLS denial of service via unbounded recursion on cross-signed peer certificate chain (high 8.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42789 and fix it if it is affected.

What it is: CVE-2026-42789 is a high-severity vulnerability in Erlang OTP, published on 27 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-42789 in the wild and no public exploit code.

Affected product: Erlang OTP. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-42789/ (Markdown: https://insights.sbomify.com/CVE-2026-42789/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-42789
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-42789
- OSV: https://osv.dev/vulnerability/CVE-2026-42789

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-42789/
Summaries are generated and may contain mistakes; the official description above is the record.
