COMMON WEAKNESS ENUMERATIONDraft

CWE-299

Improper Check for Certificate Revocation

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.

Abstraction

Base

Structure

Simple

Likelihood of Exploit

Medium

Understand the problem

What is the problem?

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.

Root cause

How and when does the problem arise?

Lifecycle phase

Implementation

When the product uses certificate pinning, the developer might not properly validate all relevant components of the certificate before pinning the certificate. This can make it difficult or expensive to test after the pinning is complete.

Lifecycle phase

Implementation

REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Risk

What does successful exploitation lead to?

Gain Privileges or Assume Identity

Affected security scopes: Access Control

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

Affected security scopes: Integrity, Other

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

Affected security scopes: Confidentiality

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

Defence

How is it prevented and fixed?

Architecture and Design

Architecture and design approach

Detail
Ensure that certificates are checked for revoked status.

Implementation

Implementation-phase defence

Detail
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.

Verification

How is it detected?

Automated Static Analysis

High
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.)