CWE-299: Improper Check for Certificate Revocation | Glexia
CWE-299 (Improper Check for Certificate Revocation) weakness overview with consequences, detection methods, mitigations, related CVEs and MITRE ATT&CK context.
Glexia's Take · Automated analysis
CWE-299: Improper Check for Certificate Revocation
Improper Check for Certificate Revocation 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 untrusted entity who somehow obtained the certificate, i.e., the entity is not who it claims to be.
- Integrity Other: Other: Data from an untrusted (and possibly malicious) source may be integrated.
- Confidentiality: Read Application Data: Data may be disclosed to an untrusted entity that obtained access to the certificate, thereby impersonating a trusted entity, resulting in information disclosure.
Developer Pattern
CWE-299 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.
Automation confidence
high confidence from CWE-299, 4.21.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Official CWE Definition
CWE-299: Improper Check for Certificate Revocation
The product does not check or incorrectly checks the revocation status of a certificate.
Developer And Remediation Guidance
How teams prevent and detect this weakness
Causes
- The following OpenSSL code ensures that there is a certificate before continuing execution. Because this code does not use SSL_get_verify_results() to check the certificate, it could accept certificates that have been revoked (X509_V_ERR_CERT_REVOKED). The product could be communicating with a malicious host.
Remediation
- Architecture and Design: Ensure that certificates are checked for revoked status.
- Implementation: If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the revoked status.
Detection
- Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Mappings
Related CVEs, CWEs, and ATT&CK context
Related CWEs
ATT&CK Relevance
ATT&CK relevance is shown only when reviewed or responsibly inferred.
