CWE-299
Description
The product does not check or incorrectly checks the revocation status of a certificate.
Consequences
Trust may be assigned to an untrusted entity who somehow obtained the certificate, i.e., the entity is not who it claims to be.
Data from an untrusted (and possibly malicious) source may be integrated.
Data may be disclosed to an untrusted entity that obtained access to the certificate, thereby impersonating a trusted entity, resulting in information disclosure.
Mitigations
Ensure that certificates are checked for revoked status.
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, 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.)