CWE-296: Improper Following of a Certificate's Chain of Trust
CWE版本: 4.18
更新日期: 2025-09-09
弱点描述
The product does not follow, or incorrectly follows, the chain of trust for a certificate back to a trusted root certificate, resulting in incorrect trust of any resource that is associated with that certificate.
常见后果
影响范围: Non-Repudiation
技术影响: Hide Activities
说明: Exploitation of this flaw can lead to the trust of data that may have originated with a spoofed source.
影响范围: Integrity Confidentiality Availability Access Control
技术影响: Gain Privileges or Assume Identity Execute Unauthorized Code or Commands
说明: Data, requests, or actions taken by the attacking entity can be carried out as a spoofed benign entity.
潜在缓解措施
阶段: Architecture and Design
描述: Ensure that proper certificate checking is included in the system design.
阶段: Implementation
描述: Understand, and properly implement all checks necessary to ensure the integrity of certificate trust integrity.
阶段: 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 full chain of trust.
检测方法
方法: 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.)
有效性: High
观察示例
参考: CVE-2016-2402
Server allows bypass of certificate pinning by sending a chain of trust that includes a trusted CA that is not pinned.
参考: CVE-2008-4989
Verification function trusts certificate chains in which the last certificate is self-signed.
参考: CVE-2012-5821
Chain: Web browser uses a TLS-related function incorrectly, preventing it from verifying that a server's certificate is signed by a trusted certification authority (CA).
参考: CVE-2009-3046
Web browser does not check if any intermediate certificates are revoked.
参考: CVE-2009-0265
chain: DNS server does not correctly check return value from the OpenSSL EVP_VerifyFinal function allows bypass of validation of the certificate chain.
参考: CVE-2009-0124
chain: incorrect check of return value from the OpenSSL EVP_VerifyFinal function allows bypass of validation of the certificate chain.
参考: CVE-2002-0970
File-transfer software does not validate Basic Constraints of an intermediate CA-signed certificate.
参考: CVE-2002-0862
Cryptographic API, as used in web browsers, mail clients, and other software, does not properly validate Basic Constraints.
引入模式
| 阶段 | 说明 |
|---|---|
| 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. |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
适用平台
编程语言
分类映射
| 分类名称 | 条目ID | 条目名称 | 映射适配度 |
|---|---|---|---|
| CLASP | - | Failure to follow chain of trust in certificate validation | - |