Common Weakness Enumeration

A Community-Developed List of Software Weakness Types

CWE/SANS Top 25 Most Dangerous Software Errors
Home > CWE List > CWE- Individual Dictionary Definition (2.11)  

CWE-370: Missing Check for Certificate Revocation after Initial Check

Weakness ID: 370
Abstraction: Base
Status: Draft
Presentation Filter:
+ Description

Description Summary

The software does not check the revocation status of a certificate after its initial revocation check, which can cause the software to perform privileged actions even after the certificate is revoked at a later time.

Extended Description

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.

+ Time of Introduction
  • Architecture and Design
  • Implementation
+ Applicable Platforms



+ Common Consequences
Access Control

Technical Impact: Gain privileges / assume identity

Trust may be assigned to an entity who is not who it claims to be.


Technical Impact: Modify application data

Data from an untrusted (and possibly malicious) source may be integrated.


Technical Impact: Read application data

Data may be disclosed to an entity impersonating a trusted entity, resulting in information disclosure.

+ Likelihood of Exploit


+ Demonstrative Examples

Example 1

The following code checks a certificate before performing an action.

(Bad Code)
Example Languages: C and C++ 
if (cert = SSL_get_peer_certificate(ssl)) {
if (X509_V_OK==foo)
//do stuff
//do more stuff without the check.

While the code performs the certificate verification before each action, it does not check the result of the verification after the initial attempt. The certificate may have been revoked in the time between the privileged actions.

+ Potential Mitigations

Phase: Architecture and Design

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.

+ Relationships
NatureTypeIDNameView(s) this relationship pertains toView(s)
ChildOfWeakness VariantWeakness Variant299Improper Check for Certificate Revocation
Development Concepts (primary)699
Research Concepts (primary)1000
ChildOfCategoryCategory988SFP Secondary Cluster: Race Condition Window
Software Fault Pattern (SFP) Clusters (primary)888
PeerOfWeakness BaseWeakness Base296Improper Following of a Certificate's Chain of Trust
Research Concepts1000
PeerOfWeakness VariantWeakness Variant297Improper Validation of Certificate with Host Mismatch
Research Concepts1000
PeerOfWeakness VariantWeakness Variant298Improper Validation of Certificate Expiration
Research Concepts1000
+ Taxonomy Mappings
Mapped Taxonomy NameNode IDFitMapped Node Name
CLASPRace condition in checking for certificate revocation
Software Fault PatternsSFP20Race Condition Window
+ References
[REF-17] Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 13: Race Conditions." Page 205. McGraw-Hill. 2010.
+ Content History
Submission DateSubmitterOrganizationSource
CLASPExternally Mined
Modification DateModifierOrganizationSource
2008-07-01Eric DalciCigitalExternal
updated Time_of_Introduction
2008-09-08CWE Content TeamMITREInternal
updated Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings
2008-10-14CWE Content TeamMITREInternal
updated Description, Other_Notes, Potential_Mitigations
2009-05-27CWE Content TeamMITREInternal
updated Name, Relationships
2011-06-01CWE Content TeamMITREInternal
updated Common_Consequences
2012-05-11CWE Content TeamMITREInternal
updated References, Relationships
2013-02-21CWE Content TeamMITREInternal
updated Applicable_Platforms, Demonstrative_Examples
2014-07-30CWE Content TeamMITREInternal
updated Demonstrative_Examples, Relationships, Taxonomy_Mappings
Previous Entry Names
Change DatePrevious Entry Name
2009-05-27Race Condition in Checking for Certificate Revocation

More information is available — Please select a different filter.
Page Last Updated: May 05, 2017