CVE-2026-42789Non-CA certificate accepted as intermediate issuer in public_key path validation
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.
What to do
Fixed builds are available from Debian, Ubuntu: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | erlang | Fixed | 1:27.3.4.6+dfsg-1ubuntu0.2 | UBUNTU-CVE-2026-42789 |
| Ubuntu 25.10 | erlang | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-42789 | |
| Ubuntu 24.04 | erlang | Fixed | 1:25.3.2.8+dfsg-1ubuntu4.8 | UBUNTU-CVE-2026-42789 |
| Ubuntu 22.04 | erlang | Fixed | 1:24.2.1+dfsg-1ubuntu0.8 | UBUNTU-CVE-2026-42789 |
| Ubuntu 20.04 | erlang | Fix pending | 1:22.2.7+dfsg-1ubuntu0.5+esm3 (Ubuntu Pro) | UBUNTU-CVE-2026-42789 |
| Ubuntu 18.04 | erlang | Fix pending | 1:20.2.2+dfsg-1ubuntu2+esm4 (Ubuntu Pro) | UBUNTU-CVE-2026-42789 |
| Ubuntu 16.04 | erlang | Fix pending | 1:18.3-dfsg-1ubuntu3.1+esm4 (Ubuntu Pro) | UBUNTU-CVE-2026-42789 |
| Ubuntu 14.04 | erlang | Fix pending | 1:16.b.3-dfsg-1ubuntu2.2+esm3 (Ubuntu Pro) | UBUNTU-CVE-2026-42789 |
| Debian 14 | erlang | Fixed | 1:27.3.4.12+dfsg-1 | DEBIAN-CVE-2026-42789 |
| Debian 13 | erlang | Fixed | 1:27.3.4.1+dfsg-1+deb13u3 | DEBIAN-CVE-2026-42789 |
| Debian 12 | erlang | Fix pending | DEBIAN-CVE-2026-42789 |
What the vendor says
As published in the CVE record by EEF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Erlang OTP: affected: 0.22 and later; fixed in
1.17.1.7,1.20.3.6,1.21.8 - Erlang OTP: affected: 17.0 and later; fixed in
27.3.4.19,28.5.0.8,29.1.2 - Erlang OTP: affected: 84adefa331c4159d432d22840663c38f155cd4c1 and later; fixed in
0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8,75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333,82af606b5437c4de1276dbcc8855a47e88231226
Workaround: The verify_fun option in the ssl or public_key application can be used to ensure that path validation rejects chains where an intermediate certificate does not have basicConstraints cA:true.
Vendor advisories:
- https://github.com/erlang/otp/security/advisories/GHSA-c99q-jmpx-v8qq (vendor-advisory)
- https://github.com/erlang/otp/commit/0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8 (patch)
- https://github.com/erlang/otp/commit/75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333 (patch)
- https://github.com/erlang/otp/commit/82af606b5437c4de1276dbcc8855a47e88231226 (patch)
References
- https://github.com/erlang/otp/security/advisories/GHSA-c99q-jmpx-v8qq
- https://cna.erlef.org/cves/CVE-2026-42789.html
- https://osv.dev/vulnerability/EEF-CVE-2026-42789
- https://www.erlang.org/doc/system/versions.html#order-of-versions
- https://github.com/erlang/otp/commit/0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8
- https://github.com/erlang/otp/commit/75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333
- https://github.com/erlang/otp/commit/82af606b5437c4de1276dbcc8855a47e88231226
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.