CVE-2026-42791: CWE-295 Improper Certificate Validation in Erlang OTP
Improper Certificate Validation vulnerability in Erlang OTP public_key (pubkey_ocsp module) allows forged OCSP responses signed with an expired responder certificate to be accepted as valid. OCSP response verification in pubkey_ocsp:verify_response/5 and pubkey_ocsp:is_authorized_responder/3 in lib/public_key/src/pubkey_ocsp.erl does not check the validity period (notBefore/notAfter) of the OCSP responder certificate. An attacker who has obtained the private key of an expired CA-designated OCSP responder certificate can forge OCSP responses that Erlang/OTP accepts as valid. This affects TLS clients using OCSP stapling via the ssl application: a malicious or compromised server can present a revoked TLS certificate together with a forged OCSP response signed by an expired responder key, and the client will accept the revoked certificate as valid. It also affects applications calling public_key:pkix_ocsp_validate/5 directly, where the impact depends on the use case — server-side client certificate validation using this API may allow authentication bypass with a revoked client certificate. This issue affects OTP from OTP 27.0 before OTP 29.0.1, OTP 28.5.0.1 and OTP 27.3.4.12, corresponding to public_key from 1.16 before 1.21.1, 1.20.3.1 and 1.17.1.3.
AI Analysis
Technical Summary
The vulnerability in Erlang OTP's public_key module (pubkey_ocsp) arises because the OCSP response verification functions do not check the validity period (notBefore/notAfter) of the OCSP responder certificate. As a result, an attacker with the private key of an expired OCSP responder certificate can forge OCSP responses that are accepted as valid by Erlang/OTP. This can lead to acceptance of revoked TLS certificates when OCSP stapling is used, or authentication bypass in server-side client certificate validation scenarios using the public_key:pkix_ocsp_validate/5 API. Affected versions include OTP 27.0 up to but not including 29.0.1, OTP 28.5.0.1, and OTP 27.3.4.12, with corresponding public_key versions from 1.16 up to but not including 1.21.1, 1.20.3.1, and 1.17.1.3.
Potential Impact
The vulnerability allows attackers who have access to the private key of an expired OCSP responder certificate to forge OCSP responses that Erlang OTP accepts as valid. This can cause TLS clients using OCSP stapling to accept revoked TLS certificates, undermining the trust model of certificate revocation. Additionally, server-side applications validating client certificates using the affected API may allow authentication bypass with revoked client certificates. This undermines the security of TLS connections and client authentication relying on OCSP validation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should consider alternative certificate validation methods or additional checks on OCSP responder certificate validity periods outside of Erlang OTP. Monitor Erlang's official channels for updates and apply official patches once released.
CVE-2026-42791: CWE-295 Improper Certificate Validation in Erlang OTP
Description
Improper Certificate Validation vulnerability in Erlang OTP public_key (pubkey_ocsp module) allows forged OCSP responses signed with an expired responder certificate to be accepted as valid. OCSP response verification in pubkey_ocsp:verify_response/5 and pubkey_ocsp:is_authorized_responder/3 in lib/public_key/src/pubkey_ocsp.erl does not check the validity period (notBefore/notAfter) of the OCSP responder certificate. An attacker who has obtained the private key of an expired CA-designated OCSP responder certificate can forge OCSP responses that Erlang/OTP accepts as valid. This affects TLS clients using OCSP stapling via the ssl application: a malicious or compromised server can present a revoked TLS certificate together with a forged OCSP response signed by an expired responder key, and the client will accept the revoked certificate as valid. It also affects applications calling public_key:pkix_ocsp_validate/5 directly, where the impact depends on the use case — server-side client certificate validation using this API may allow authentication bypass with a revoked client certificate. This issue affects OTP from OTP 27.0 before OTP 29.0.1, OTP 28.5.0.1 and OTP 27.3.4.12, corresponding to public_key from 1.16 before 1.21.1, 1.20.3.1 and 1.17.1.3.
CVSS v4.0
Score 6.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Erlang OTP's public_key module (pubkey_ocsp) arises because the OCSP response verification functions do not check the validity period (notBefore/notAfter) of the OCSP responder certificate. As a result, an attacker with the private key of an expired OCSP responder certificate can forge OCSP responses that are accepted as valid by Erlang/OTP. This can lead to acceptance of revoked TLS certificates when OCSP stapling is used, or authentication bypass in server-side client certificate validation scenarios using the public_key:pkix_ocsp_validate/5 API. Affected versions include OTP 27.0 up to but not including 29.0.1, OTP 28.5.0.1, and OTP 27.3.4.12, with corresponding public_key versions from 1.16 up to but not including 1.21.1, 1.20.3.1, and 1.17.1.3.
Potential Impact
The vulnerability allows attackers who have access to the private key of an expired OCSP responder certificate to forge OCSP responses that Erlang OTP accepts as valid. This can cause TLS clients using OCSP stapling to accept revoked TLS certificates, undermining the trust model of certificate revocation. Additionally, server-side applications validating client certificates using the affected API may allow authentication bypass with revoked client certificates. This undermines the security of TLS connections and client authentication relying on OCSP validation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should consider alternative certificate validation methods or additional checks on OCSP responder certificate validity periods outside of Erlang OTP. Monitor Erlang's official channels for updates and apply official patches once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-04-29T18:06:33.251Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a16f9d5e29bf47b50c0e945
Added to database: 05/27/2026, 14:04:05 UTC
Last enriched: 07/24/2026, 21:35:01 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 74
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.