Description
The product does not check the revocation status of a certificate after its initial revocation check, which can cause the product to perform privileged actions even after the certificate is revoked at a later time.
If the revocation status of a certificate is not checked before each action that requires privileges, the system may be subject to a race condition. If a certificate is revoked after the initial check, all subsequent actions taken with the owner of the revoked certificate will lose all benefits guaranteed by the certificate. In fact, it is almost certain that the use of a revoked certificate indicates malicious activity.
Potential Impact
Access Control
Gain Privileges or Assume Identity
Integrity
Modify Application Data
Confidentiality
Read Application Data
Demonstrative Examples
if (cert = SSL_get_peer_certificate(ssl)) {
foo=SSL_get_verify_result(ssl);if (X509_V_OK==foo)
//do stuff
foo=SSL_get_verify_result(ssl);
//do more stuff without the check.Mitigations & Prevention
Ensure that certificates are checked for revoked status before each use of a protected resource. If the certificate is checked before each access of a protected resource, the delay subject to a possible race condition becomes almost negligible and significantly reduces the risk associated with this issue.
Related Weaknesses
Taxonomy Mappings
- CLASP: — Race condition in checking for certificate revocation
- Software Fault Patterns: SFP20 — Race Condition Window
Frequently Asked Questions
What is CWE-370?
CWE-370 (Missing Check for Certificate Revocation after Initial Check) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The product does not check the revocation status of a certificate after its initial revocation check, which can cause the product to perform privileged actions even after the certificate is revoked at...
How can CWE-370 be exploited?
Attackers can exploit CWE-370 (Missing Check for Certificate Revocation after Initial Check) to gain privileges or assume identity. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-370?
Key mitigations include: Ensure that certificates are checked for revoked status before each use of a protected resource. If the certificate is checked before each access of a protected resource, the delay subject to a possib
What is the severity of CWE-370?
CWE-370 is classified as a Variant-level weakness (Low-Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.