# CVE-2026-42790: nameConstraints DNS bypass via subject CommonName fallback in public\_key hostname verification

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.6
- **CVSS:** 7.6 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Attack requirements: Present; Privileges required: None; User interaction: Passive; Confidentiality impact: High; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.49% (percentile 35, 2026-11-26)
- **CWE:** CWE-295, CWE-297
- **Published:** 2026-05-27T15:09:01.860Z
- **Modified:** 2026-11-20T06:17:26.767Z

## Who should check

- Anyone running Erlang OTP \>= 1.4, \< \*
- Anyone running Erlang OTP \>= 19.3, \< \*
- Anyone running Erlang OTP \>= b0c245e8132bb13171e277b1af59c0cec00c9459, \< \*

## 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.

## Affected and fixed versions

- Erlang OTP: \>= 1.4, \< \* (cvelist)
- Erlang OTP: \>= 19.3, \< \* (cvelist)
- Erlang OTP: \>= b0c245e8132bb13171e277b1af59c0cec00c9459, \< \* (cvelist)

## Mitigation

- Vendor workaround: The verify\_fun option in the ssl application can be used to ensure that TLS connections fail if the end-entity certificate is missing the subjectAltName extension or has no domain name. Do not use a verify\_fun that accepts the name\_not\_permitted error.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-42790. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-42790.md
Affected: Erlang OTP >= 1.4, < *; Erlang OTP >= 19.3, < *; Erlang OTP >= b0c245e8132bb13171e277b1af59c0cec00c9459, < *
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for Erlang OTP: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-42790 being exploited?

There is no confirmed exploitation: CVE-2026-42790 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.49% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-42790?

High: CVSS 7.6 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

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

Erlang OTP \>= 1.4, \< \*; Erlang OTP \>= 19.3, \< \*; Erlang OTP \>= b0c245e8132bb13171e277b1af59c0cec00c9459, \< \*.

### Is there a fix for CVE-2026-42790?

No fixed version is listed in the sources yet. Vendor workaround: The verify\_fun option in the ssl application can be used to ensure that TLS connections fail if the end-entity certificate is missing the subjectAltName extension or has no domain name. Do not use a verify\_fun that accepts the name\_not\_permitted error.

### How do I check if I'm affected by CVE-2026-42790?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/erlang/otp/security/advisories/GHSA-22cw-4ph4-6447>
- vendor: <https://access.redhat.com/errata/RHSA-2026:54757>
- vendor: <https://access.redhat.com/errata/RHSA-2026:39809>
- patch: <https://github.com/erlang/otp/commit/b0c245e8132bb13171e277b1af59c0cec00c9459>
- patch: <https://github.com/erlang/otp/commit/0769050c69d73762672b0db1347b6993a5b31759>
- patch: <https://github.com/erlang/otp/commit/21abed64eb2026b5f82f432709e4e932f9be389a>
- patch: <https://github.com/erlang/otp/commit/fb67c6d1836f51105a96d8b769e71e4215a79457>
- other: <https://cna.erlef.org/cves/CVE-2026-42790.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-42790>
- other: <https://www.erlang.org/doc/system/versions.html#order-of-versions>
- other: <https://access.redhat.com/security/cve/CVE-2026-42790>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2482286>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42790.json>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-42790>

HTML: <https://flawdb.com/CVE-2026-42790> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-42790>
