Improper Check for Certificate Revocation

Draft Base
Structure: Simple
Description

The product does not check or incorrectly checks the revocation status of a certificate, which may cause it to use a certificate that has been compromised.

Extended Description

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.

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: IntegrityOther

Impact: Other

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.

Detection Methods 1
Automated Static AnalysisHigh
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.)
Potential Mitigations 2
Phase: Architecture and Design
Ensure that certificates are checked for revoked status.
Phase: 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.
Demonstrative Examples 1

ID : DX-124

The following OpenSSL code ensures that there is a certificate before continuing execution.

Code Example:

Bad
C
c

// got a certificate, do secret things*

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.
Observed Examples 12
CVE-2011-2014LDAP-over-SSL implementation does not check Certificate Revocation List (CRL), allowing spoofing using a revoked certificate.
CVE-2011-0199Operating system does not check Certificate Revocation List (CRL) in some cases, allowing spoofing using a revoked certificate.
CVE-2010-5185Antivirus product does not check whether certificates from signed executables have been revoked.
CVE-2009-3046Web browser does not check if any intermediate certificates are revoked.
CVE-2009-0161chain: Ruby module for OCSP misinterprets a response, preventing detection of a revoked certificate.
CVE-2011-2701chain: incorrect parsing of replies from OCSP responders allows bypass using a revoked certificate.
CVE-2011-0935Router can permanently cache certain public keys, which would allow bypass if the certificate is later revoked.
CVE-2009-1358chain: OS package manager does not properly check the return value, allowing bypass using a revoked certificate.
CVE-2009-0642chain: language interpreter does not properly check the return value from an OSCP function, allowing bypass using a revoked certificate.
CVE-2008-4679chain: web service component does not call the expected method, which prevents a check for revoked certificates.
CVE-2006-4410Certificate revocation list not searched for certain certificates.
CVE-2006-4409Product cannot access certificate revocation list when an HTTP proxy is being used.
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
Implementation
Taxonomy Mapping
  • CLASP