Missing Check for Certificate Revocation after Initial Check

Draft Variant
Structure: Simple
Description

This vulnerability occurs when software only verifies a certificate's revocation status once, then continues to trust it for subsequent privileged actions without re-checking. This allows operations to proceed even if the certificate is revoked later.

Extended Description

A single initial revocation check creates a dangerous race condition. If an attacker's certificate is revoked after that first check, the system will continue granting it full privileges for all later requests, as if the certificate were still valid. This essentially nullifies the security guarantee that revocation provides. Since certificate revocation almost always signals a compromise or malicious intent, failing to re-validate before each privileged action is a critical oversight. To prevent this, your code must perform a fresh revocation check (e.g., via OCSP or CRL) every time the certificate is used to authorize a sensitive operation, not just during the initial handshake or connection setup.

Common Consequences 3
Scope: Access Control

Impact: Gain Privileges or Assume Identity

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

Scope: Integrity

Impact: Modify Application Data

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

Scope: Confidentiality

Impact: Read Application Data

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

Potential Mitigations 1
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.
Demonstrative Examples 1
The following code checks a certificate before performing an action.

Code Example:

Bad
C
c

//do stuff* foo=SSL_get_verify_result(ssl);

c
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.
References 2
The CLASP Application Security Process
Secure Software, Inc.
2005
ID: REF-18
24 Deadly Sins of Software Security
Michael Howard, David LeBlanc, and John Viega
McGraw-Hill
2010
ID: REF-44
Likelihood of Exploit

Medium

Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Implementation
Taxonomy Mapping
  • CLASP
  • Software Fault Patterns