CWE-370: Missing Check for Certificate Revocation after Initial Check
Official CWE-370 CWE context with Glexia analysis, remediation guidance, related CVEs, and ATT&CK context.
Glexia's Take
CWE-370: Missing Check for Certificate Revocation after Initial Check
Missing Check for Certificate Revocation after Initial Check represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Executive Impact
- Access Control: Gain Privileges or Assume Identity: Trust may be assigned to an entity who is not who it claims to be.
- Integrity: Modify Application Data: Data from an untrusted (and possibly malicious) source may be integrated.
- Confidentiality: Read Application Data: Data may be disclosed to an entity impersonating a trusted entity, resulting in information disclosure.
Developer Pattern
CWE-370 is the kind of defect developers can usually prevent with explicit validation, safer framework defaults, and tests that exercise hostile input or unsafe state transitions.
Confidence
high confidence from CWE-370, 4.20.
Official CWE Definition
CWE-370: Missing Check for Certificate Revocation after Initial Check
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.
Developer And Remediation Guidance
How teams prevent and detect this weakness
Causes
- The following code checks a certificate before performing an action. 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.
Remediation
- 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.
Detection
- Code review
- SAST
- DAST
- Focused regression tests
Mappings
Related CVEs, CWEs, and ATT&CK context
Related CWEs
ATT&CK Relevance
ATT&CK relevance is shown only when reviewed or responsibly inferred.