CVE-2026-42790
nameConstraints DNS bypass via subject CommonName fallback in public_key hostname verification
Check your servers for CVE-2026-42790
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-42790 affects otp, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Improper Certificate Validation vulnerability in Erlang OTP public_key (pubkey_cert and public_key modules) allows a DNS nameConstraints bypass via subject CommonName fallback in TLS hostname verification.
Two flaws combine to allow a subordinate CA whose DNS nameConstraints are restricted (e.g. permitted;DNS:allowed.example.com) to issue a leaf certificate that an OTP TLS client accepts as a valid identity for an out-of-scope hostname (e.g. victim.example.com):
First, pubkey_cert:validate_names/6 in lib/public_key/src/pubkey_cert.erl only checks SAN DNS entries against nameConstraints. Per RFC 5280, a permitted DNS subtree only restricts certificates that contain a DNS-typed name. A leaf with no subjectAltName therefore trivially satisfies any permitted;DNS:... constraint regardless of its subject commonName.
Second, public_key:pkix_verify_hostname/3 in lib/public_key/src/public_key.erl falls back to the subject commonName when no subjectAltName is present, extracting id-at-commonName attributes as presented IDs and matching them against the reference hostname. The strict pkix_verify_hostname_match_fun(https) matcher does not suppress this fallback.
The result is that path validation accepts a CN-only leaf under a DNS-constrained intermediate (no SAN means the nameConstraints are not triggered), and hostname verification then accepts it via the CN fallback. The bypass is reachable from stock ssl:connect with verify_peer, a trusted CA, SNI, and the canonical strict https hostname matcher.
This issue affects OTP from OTP 19.3 before OTP 26.2.5.21, OTP 27.3.4.12, OTP 28.5.0.1, and OTP 29.0.1, corresponding to public_key from 1.4 before 1.15.1.7, 1.17.1.3, 1.20.3.1, and 1.21.1.
Severity (CVSS)
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Attack requirements
- present: an attack works only when the target is in a certain state or configuration
- Privileges required
- none: the attacker does not need an account
- User interaction
- passive: a user has to take part without knowing, such as by viewing a page
- Impact on the vulnerable system
- confidentiality high, integrity high, availability none: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality none, integrity none, availability none: what an attacker can read, change or stop beyond it
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.43%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 38.7% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 27 May 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-295 Improper Certificate Validation
- CWE-297 Improper Validation of Certificate with Host Mismatch
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
OTP
package
public_key |
affected 1.4 and later (unaffected from 1.15.1.7, unaffected from 1.17.1.3, unaffected from 1.20.3.1, unaffected from 1.21.1)
Other versions: unaffected
|
|
OTP
package
otp |
affected 19.3 and later (unaffected from 26.2.5.21, unaffected from 27.3.4.12, unaffected from 28.5.0.1, unaffected from 29.0.1)
Other versions: unaffected
|
|
OTP
package
erlang/otp |
affected b0c245e8132bb13171e277b1af59c0cec00c9459 and later (unaffected from 0769050c69d73762672b0db1347b6993a5b31759, unaffected from 21abed64eb2026b5f82f432709e4e932f9be389a, unaffected from fb67c6d1836f51105a96d8b769e71e4215a79457)
Other versions: unaffected
|
Is my server affected?
Find the installed version of otp and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i otp
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-42790 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-42790RHEL, Rocky, Alma, Fedora
rpm -q otp
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-42790Alpine
apk list --installed | grep -i otpWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-42790
trivy image --scanners vuln IMAGE | grep CVE-2026-42790
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- Name Constraints and Subject CommonName Fallback in TLS hostname Verification github.com · vendor advisory, related
- https://access.redhat.com/security/cve/CVE-2026-42790 access.redhat.com · vdb entry
- RHBZ#2482286 bugzilla.redhat.com · issue tracking
- https://access.redhat.com/errata/RHSA-2026:54757 access.redhat.com · vendor advisory
- https://access.redhat.com/errata/RHSA-2026:39809 access.redhat.com · vendor advisory
Patches and release notes
- Fix commit 0769050 in erlang/otp github.com · patch
- Fix commit 21abed6 in erlang/otp github.com · patch
- Fix commit fb67c6d in erlang/otp github.com · patch
Other references
- EEF CNA record for CVE-2026-42790 cna.erlef.org · related
- OSV record EEF-CVE-2026-42790 osv.dev · related
- Erlang/OTP version ordering erlang.org
- Introducing commit b0c245e in erlang/otp github.com · related
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42790.json security.access.redhat.com
Source: the record CVE-2026-42790 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse