Erlang\/otpApplication · Erlang

CVE-2026-42790

HIGH · 8.1 CVSS v3.1 Published 2026-05-27
Fix available
A fix is available. Upgrade to 26.2.5.21 / 27.3.4.12 or later.
See remediation →
88/100
Remediation priority · High
Remotely reachable No privileges Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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 29.0.1, OTP 28.5.0.1, OTP 27.3.4.12 and OTP 26.2.5.21, corresponding to public_key from 1.4 before 1.21.1, 1.20.3.1, 1.17.1.3 and 1.15.1.7.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis
How this class of weakness works · CWE-295

The application does not properly validate the TLS certificate presented by the other side — skipping the chain, the hostname, or expiry — so an attacker with a forged or mismatched certificate can sit in the middle of a supposedly secure connection. It is a common trap in custom clients and misconfigured libraries. The fix is full certificate validation, and never disabling verification to make errors go away.

General guidance for the improper certificate validation class — the official description and references above are authoritative for this specific CVE. Want a bespoke review and a reviewed fix? Ask our team →

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Erlang\/otpApplication
Affected:>= 19.3, < 26.2.5.21>= 27.0, < 27.3.4.12>= 28.0, < 28.5.0.1>= 29.0, < 29.0.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 26.2.5.21 / 27.3.4.12 / 28.5.0.1 or later
Fixed in 26.2.5.2127.3.4.1228.5.0.1
Vendor patch github.com →
Recommended fix High confidence

Upgrade to OTP 26.2.5.21 (for 26.x), 27.3.4.12 (for 27.x), 28.5.0.1 (for 28.x), or 29.0.1 (for 29.x)

  1. Identify the current OTP version by running 'erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell' or checking the OTP installation
  2. Determine which major OTP release line you are on (26.x, 27.x, 28.x, or 29.x)
  3. Upgrade to the fixed patch release for your release line: OTP 26.2.5.21, 27.3.4.12, 28.5.0.1, or 29.0.1 respectively
  4. Use your system's package manager (e.g., apt, yum, brew) or download the specific version from https://www.erlang.org/downloads or https://github.com/erlang/otp/releases
  5. Verify the upgrade was successful by running 'erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell' and confirming the version matches the expected fixed release
Caveat Major OTP version upgrades may introduce breaking changes in user code; review the release notes for your target version for migration notes

Generated from the published advisory — verify against the referenced sources before acting.

We can perform the upgrade in your staging environment and verify nothing breaks — typical engagement from $1,950. Get the upgrade done

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-42790 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-42790 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data