CWE-299: Improper Check for Certificate Revocation
Improper Check for Certificate Revocation
Weakness ID: 299 (Weakness Base)
Status: Draft
Description
Description Summary
The software does not check or incorrectly checks the revocation status of a certificate, which may cause it to use a certificate that has been compromised.
Time of Introduction
Architecture and Design
Applicable Platforms
Languages
All
Common Consequences
Scope
Effect
Access Control
Technical Impact: Gain privileges / assume
identity
Trust may be assigned to an entity who is not who it claims to
be.
Integrity
Other
Technical Impact: Other
Data from an untrusted (and possibly malicious) source may be
integrated.
Confidentiality
Technical Impact: Read application
data
Data may be disclosed to an entity impersonating a trusted entity,
resulting in information disclosure.
Likelihood of Exploit
Medium
Demonstrative Examples
Example 1
(Bad Code)
Example Languages: C and C++
if (!(cert = SSL_get_peer(certificate(ssl)) || !host)
...
without a get_verify_results
Potential Mitigations
Phase: Architecture and Design
Ensure that certificates are checked for revoked status.
Other Notes
An improper check for certificate revocation is a far more serious flaw
than related certificate failures. This is because the use of any revoked
certificate is almost certainly malicious. The most common reason for
certificate revocation is compromise of the system in question, with the
result that no legitimate servers will be using a revoked certificate,
unless they are sorely out of sync.
[REF-17] Michael Howard, David LeBlanc
and John Viega. "24 Deadly Sins of Software Security". "Sin 23: Improper Use of PKI, Especially SSL." Page
347. McGraw-Hill. 2010.