{"id":"EEF-CVE-2026-42789","summary":"Non-CA certificate accepted as intermediate issuer in public_key path validation","details":"## Summary\n\nImproper 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.\n\n## Workarounds\n\nThe `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`.","aliases":["CVE-2026-42789","GHSA-c99q-jmpx-v8qq"],"modified":"2026-10-14T17:01:07.895774215Z","published":"2026-05-27T12:23:06.355Z","database_specific":{"cwe_ids":["CWE-295","CWE-296"],"capec_ids":["CAPEC-475"],"cpe_ids":["cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*"]},"references":[{"type":"ADVISORY","url":"https://github.com/erlang/otp/security/advisories/GHSA-c99q-jmpx-v8qq"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-42789.html"},{"type":"WEB","url":"https://www.erlang.org/doc/system/versions.html#order-of-versions"},{"type":"FIX","url":"https://github.com/erlang/otp/commit/0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8"},{"type":"FIX","url":"https://github.com/erlang/otp/commit/75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333"},{"type":"FIX","url":"https://github.com/erlang/otp/commit/82af606b5437c4de1276dbcc8855a47e88231226"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/erlang/otp","events":[{"introduced":"84adefa331c4159d432d22840663c38f155cd4c1"},{"fixed":"0a05b7ca33fb0b3f0a6cb9ae34252bb3a74032b8"},{"fixed":"75ca4c0dc2bbdb286ac3c3fe89cb4b4d2b4dc333"},{"fixed":"82af606b5437c4de1276dbcc8855a47e88231226"}]}],"versions":["OTP-27.3.4.18","OTP-28.5.0.7","OTP-29.1.1","patch-base-28","OTP-28.5","patch-base-27","OTP-27.3.4","OTP-27.3.4.17","OTP-28.5.0.6","OTP-29.1","OTP-29.0","OTP-27.3.4.9","OTP-27.3.4.10","OTP-28.5.0.2","OTP-28.5.0.5","OTP-27.3.4.14","OTP-27.3.4.16","OTP-27.3.4.15","OTP-28.5.0.4","OTP-28.5.0.3","OTP-27.3.4.13","OTP-28.4","OTP-27.3.4.12","OTP-28.5.0.1","OTP-27.0","OTP-27.3.4.11","OTP-29.0-rc3","OTP-28.0","OTP-29.0-rc2","OTP-27.3.4.8","OTP-27.3.4.6","OTP-27.3.4.7","OTP-29.0-rc1","OTP-27.3","OTP-27.3.4.5","OTP-27.3.4.4","OTP-28.1","OTP-27.3.4.3","OTP-27.3.3","OTP-27.3.4.2","OTP-26.0","OTP-25.0","OTP-27.3.4.1","OTP-28.0-rc4","OTP-27.3.2","OTP-28.0-rc3","OTP-27.2","OTP-28.0-rc2","OTP-27.3.1","OTP-28.0-rc1","OTP-27.1","OTP-27.0-rc3","OTP-27.0-rc2","OTP-27.0-rc1","OTP-24.0","OTP-26.0-rc3","OTP-26.0-rc2","OTP-26.0-rc1","OTP-23.0","OTP-21.0","OTP-25.0-rc3","OTP-25.0-rc2","OTP-25.0-rc1","OTP-22.0","OTP-24.0-rc3","OTP-24.0-rc2","OTP-24.0-rc1","OTP-23.0-rc3","OTP-23.0-rc2","OTP-23.0-rc1","OTP-20.0","OTP-22.0-rc3","OTP-22.0-rc2","OTP-22.0-rc1","OTP-19.0","OTP-21.0-rc2","OTP-18.0","OTP-21.0-rc1","OTP-17.0","OTP-20.0-rc2","OTP-20.0-rc1","OTP-19.0-rc2","OTP-19.0-rc1","OTP_R16B","OTP-18.0-rc1","OTP_17.0-rc2","OTP_17.0-rc1","OTP_R13B03","OTP_R16A_RELEASE_CANDIDATE","OTP_R14B03","OTP_R15B","OTP_R15A","OTP_R14B02","OTP_R14B01","OTP_R14B","OTP_R13B04","OTP_R14A"],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-42789.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}],"credits":[{"name":"John Downey","type":"FINDER"},{"name":"Ingela Anderton Andin","type":"REMEDIATION_DEVELOPER"},{"name":"Jakub Witczak","type":"ANALYST"},{"name":"Ada Logics","type":"REMEDIATION_REVIEWER"}]}