{"id":"CVE-2026-42789","state":"PUBLISHED","title":"Non-CA certificate accepted as intermediate issuer in public_key path validation","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.\n\nIn 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.\n\nAny 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.\n\nThis 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.","publishedAt":"2026-05-27T12:23:06.355Z","updatedAt":"2026-10-14T16:55:37.359Z","severity":{"score":7,"label":"High","version":"4.0","vector":"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","source":"EEF"},"assigner":"EEF","products":["Erlang OTP"],"affected":[{"vendor":"Erlang","product":"OTP","packageName":"otp","packageURL":"pkg:software-id/erlang.org/otp","defaultStatus":"unknown","versions":[{"version":"17.0","status":"affected","lessThan":"*","changes":[{"at":"27.3.4.19","status":"unaffected"},{"at":"28.5.0.8","status":"unaffected"},{"at":"29.1.2","status":"unaffected"}],"versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["pubkey_cert"],"programFiles":["lib/public_key/src/pubkey_cert.erl"],"programRoutines":[{"name":"pubkey_cert:validate_extensions/7"}]},{"vendor":"Erlang","product":"OTP","packageName":"public_key","packageURL":"pkg:otp/public_key?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git","defaultStatus":"unknown","versions":[{"version":"0.22","status":"affected","lessThan":"*","changes":[{"at":"1.17.1.7","status":"unaffected"},{"at":"1.20.3.6","status":"unaffected"},{"at":"1.21.8","status":"unaffected"}],"versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["pubkey_cert"],"programFiles":["src/pubkey_cert.erl"],"programRoutines":[{"name":"pubkey_cert:validate_extensions/7"}],"repo":"https://github.com/erlang/otp"},{"vendor":"Erlang","product":"OTP","packageName":"erlang/otp","packageURL":"pkg:github/erlang/otp","defaultStatus":"unknown","versions":[{"version":"84adefa331c4159d432d22840663c38f155cd4c1","status":"affected","lessThan":"*","changes":[{"at":"0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8","status":"unaffected"},{"at":"75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333","status":"unaffected"},{"at":"82af606b5437c4de1276dbcc8855a47e88231226","status":"unaffected"}],"versionType":"git"},{"version":"0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8","status":"unaffected","lessThan":"*","versionType":"git"},{"version":"75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333","status":"unaffected","lessThan":"*","versionType":"git"},{"version":"82af606b5437c4de1276dbcc8855a47e88231226","status":"unaffected","lessThan":"*","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["pubkey_cert"],"programFiles":["lib/public_key/src/pubkey_cert.erl"],"programRoutines":[{"name":"pubkey_cert:validate_extensions/7"}],"repo":"https://github.com/erlang/otp"}],"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","https://access.redhat.com/security/cve/CVE-2026-42789","https://bugzilla.redhat.com/show_bug.cgi?id=2482093","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42789.json","https://access.redhat.com/errata/RHSA-2026:54757","https://access.redhat.com/errata/RHSA-2026:39809"],"weaknesses":["CWE-295","CWE-296"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/42xxx/CVE-2026-42789.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-42789","state":"PUBLISHED","datePublished":"2026-05-27T12:23:06.355Z","dateUpdated":"2026-10-14T16:55:37.359Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-04-29T18:06:33.251Z"},"containers":{"cna":{"title":"Non-CA certificate accepted as intermediate issuer in public_key path validation","descriptions":[{"lang":"en","value":"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.\n\nIn 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.\n\nAny 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.\n\nThis 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."}],"affected":[{"vendor":"Erlang","product":"OTP","packageName":"otp","packageURL":"pkg:software-id/erlang.org/otp","defaultStatus":"unknown","versions":[{"version":"17.0","status":"affected","lessThan":"*","changes":[{"at":"27.3.4.19","status":"unaffected"},{"at":"28.5.0.8","status":"unaffected"},{"at":"29.1.2","status":"unaffected"}],"versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["pubkey_cert"],"programFiles":["lib/public_key/src/pubkey_cert.erl"],"programRoutines":[{"name":"pubkey_cert:validate_extensions/7"}]},{"vendor":"Erlang","product":"OTP","packageName":"public_key","packageURL":"pkg:otp/public_key?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%2Bhttps:%2F%2Fgithub.com%2Ferlang%2Fotp.git","defaultStatus":"unknown","versions":[{"version":"0.22","status":"affected","lessThan":"*","changes":[{"at":"1.17.1.7","status":"unaffected"},{"at":"1.20.3.6","status":"unaffected"},{"at":"1.21.8","status":"unaffected"}],"versionType":"otp"}],"cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["pubkey_cert"],"programFiles":["src/pubkey_cert.erl"],"programRoutines":[{"name":"pubkey_cert:validate_extensions/7"}],"repo":"https://github.com/erlang/otp"},{"vendor":"Erlang","product":"OTP","packageName":"erlang/otp","packageURL":"pkg:github/erlang/otp","defaultStatus":"unknown","versions":[{"version":"84adefa331c4159d432d22840663c38f155cd4c1","status":"affected","lessThan":"*","changes":[{"at":"0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8","status":"unaffected"},{"at":"75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333","status":"unaffected"},{"at":"82af606b5437c4de1276dbcc8855a47e88231226","status":"unaffected"}],"versionType":"git"},{"version":"0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8","status":"unaffected","lessThan":"*","versionType":"git"},{"version":"75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333","status":"unaffected","lessThan":"*","versionType":"git"},{"version":"82af606b5437c4de1276dbcc8855a47e88231226","status":"unaffected","lessThan":"*","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"],"modules":["pubkey_cert"],"programFiles":["lib/public_key/src/pubkey_cert.erl"],"programRoutines":[{"name":"pubkey_cert:validate_extensions/7"}],"repo":"https://github.com/erlang/otp"}],"references":[{"url":"https://github.com/erlang/otp/security/advisories/GHSA-c99q-jmpx-v8qq","name":"GitHub Advisory","tags":["related","vendor-advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-42789.html","name":"EEF CNA record for CVE-2026-42789","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-42789","name":"OSV record EEF-CVE-2026-42789","tags":["related"]},{"url":"https://www.erlang.org/doc/system/versions.html#order-of-versions","name":"Erlang/OTP version ordering","tags":["x_version-scheme"]},{"url":"https://github.com/erlang/otp/commit/0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8","name":"Fix commit 0a05b7c in erlang/otp","tags":["patch"]},{"url":"https://github.com/erlang/otp/commit/75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333","name":"Fix commit 75ca4c0 in erlang/otp","tags":["patch"]},{"url":"https://github.com/erlang/otp/commit/82af606b5437c4de1276dbcc8855a47e88231226","name":"Fix commit 82af606 in erlang/otp","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":7,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-295","description":"CWE-295 Improper Certificate Validation","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-296","description":"CWE-296 Improper Following of a Certificate's Chain of Trust","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-10-14T16:55:37.359Z"},"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"27.3.4.19","vulnerable":true},{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"28.5.0.8","versionStartIncluding":"28.0","vulnerable":true},{"criteria":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","versionEndExcluding":"29.1.2","versionStartIncluding":"29.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"John Downey"},{"lang":"en","type":"remediation developer","value":"Ingela Anderton Andin"},{"lang":"en","type":"analyst","value":"Jakub Witczak"},{"lang":"en","type":"remediation reviewer","value":"Ada Logics"}],"datePublic":"2026-05-27T12:23:06.000Z","impacts":[{"capecId":"CAPEC-475","descriptions":[{"lang":"en","value":"CAPEC-475 Signature Spoofing by Improper Validation"}]}],"source":{"discovery":"EXTERNAL"},"workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>The <code>verify_fun</code> option in the <code>ssl</code> or <code>public_key</code> application can be used to ensure that path validation rejects chains where an intermediate certificate does not have <code>basicConstraints cA:true</code>.</p>"},{"base64":false,"type":"text/markdown","value":"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`."}],"value":"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."}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-27T15:41:47.903975Z","id":"CVE-2026-42789","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-27T15:43:46.333Z"}},{"title":"erlang: Erlang OTP public_key: Certificate chain forgery via improper trust chain validation","descriptions":[{"lang":"en","value":"A flaw was found in Erlang OTP's public_key module. This vulnerability (CWE-295), related to improper certificate validation, allows a non-Certificate Authority (CA) certificate to be accepted as an intermediate issuer. A remote attacker, holding an end-entity certificate issued by a trusted CA, can exploit this by forging leaf certificates for arbitrary identities. This can lead to compromised server identity verification on the client side and client certificate verification on mutual Transport Layer Security (mTLS) servers, undermining the trust in certificate-based authentication."}],"affected":[{"vendor":"Red Hat","product":"Red Hat OpenStack Platform 16.2","packageName":"erlang","defaultStatus":"affected","versions":[{"version":"0:23.3.4.18-2.el8ost","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openstack:16.2::el8"]},{"vendor":"Red Hat","product":"Red Hat OpenStack Services on OpenShift 18.0","packageName":"erlang","defaultStatus":"affected","versions":[{"version":"0:26.2.5.21-2.el9ost","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openstack:18.0::el9"]},{"vendor":"Red Hat","product":"Red Hat Hardened Images","packageName":"erlang27","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:hummingbird:1"]},{"vendor":"Red Hat","product":"Red Hat OpenStack Platform 17.1","packageName":"erlang","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:openstack:17.1"]}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-42789","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2482093","name":"RHBZ#2482093","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42789.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:54757","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:39809","tags":["vendor-advisory","x_refsource_REDHAT"]}],"metrics":[{"other":{"content":{"namespace":"https://access.redhat.com/security/updates/classification/","value":"Important"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-295","description":"Improper Certificate Validation","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat-SADP","orgId":"0b0ca135-0b70-47e7-9f44-1890c2a1c46c","dateUpdated":"2026-09-18T12:04:44.359Z"},"datePublic":"2026-05-27T12:23:06.355Z","solutions":[{"lang":"en","value":"RHSA-2026:54757: Red Hat OpenStack Platform 16.2"},{"lang":"en","value":"RHSA-2026:39809: Red Hat OpenStack Services on OpenShift 18.0"}],"timeline":[{"lang":"en","time":"2026-05-27T15:10:36.175Z","value":"Reported to Red Hat."},{"lang":"en","time":"2026-05-27T12:23:06.355Z","value":"Made public."}],"workarounds":[{"lang":"en","value":"Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability."}],"x_adpType":"supplier","x_generator":{"engine":"sadp-cli 1.0.0"}}]}}}