---
title: "CWE-296: Improper Following of a Certificate's Chain of Trust"
url: https://radicalnotion.ai/cwe/cwe-296
type: cwe
description: "The product does not follow, or incorrectly follows, the chain of trust for a certificate back to a trusted root certificate."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-296: Improper Following of a Certificate's Chain of Trust

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **Likelihood of exploit:** Low
- **CVEs with this as primary weakness:** 15
- **Of those, in CISA KEV:** 0
- **New in 2026:** 6
- **CWE catalog version:** 4.21

## Description

The product does not follow, or incorrectly follows, the chain of trust for a certificate back to a trusted root certificate.

There are several ways in which the chain of trust might be broken, including but not limited to:

Any certificate in the chain is self-signed, unless it is the root.

Not every intermediate certificate is checked, starting from the original certificate all the way up to the root certificate.

An intermediate, CA-signed certificate does not have the expected Basic Constraints or other important extensions.

The root certificate has been compromised or authorized to the wrong party.

## Background

The trust gained from a certificate is derived from a chain of trust -- with a reputable trusted entity at the end of that list. The end user must trust that reputable source, and this reputable source must vouch for the resource in question through the medium of the certificate. In some cases, this trust traverses several entities who vouch for one another. The entity trusted by the end user is at one end of this trust chain, while the certificate-wielding resource is at the other end of the chain. If the product receives a certificate at the end of one of these trust chains and then proceeds to check only the first link in the chain, no real trust has been derived, since the entire chain must be traversed back to a trusted source to verify the certificate.

## Modes of introduction

| Phase | Note |
| --- | --- |
| 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. |

## Applicable platforms

**Technologies:** Web Based (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| 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. |

## Potential mitigations

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

## Detection methods

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

Effectiveness: High

## Demonstrative examples

### Example 1

This code checks the certificate of a connected peer.

Bad code:

```c
if ((cert = SSL_get_peer_certificate(ssl)) && host)
    foo=SSL_get_verify_result(ssl);

if ((X509_V_OK==foo) || X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN==foo))

    // certificate looks good, host can be trusted
```

In this case, because the certificate is self-signed, there was no external authority that could prove the identity of the host. The program could be communicating with a different system that is spoofing the host, e.g. by poisoning the DNS cache or using an Adversary-in-the-Middle (AITM) attack to modify the traffic from server to client.

## Observed examples

| CVE | Description |
| --- | --- |
| 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. |

## Real CVEs with this weakness (sample of 12 of 15)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-96770 | s2s-proxy accepts untrusted client certificates | critical | 9.3 | - | No | 2026-09-23 |
| CVE-2025-48057 | Icinga 2 certificate renewal might incorrectly renew an invalid certificate | critical | 9.3 | - | No | 2025-05-27 |
| CVE-2021-23155 | - | critical | 9.0 | - | No | 2021-11-18 |
| CVE-2026-24066 | Slate Digital Connect macOS XPC certificate validation privilege escalation | high | 8.4 | - | No | 2026-06-10 |
| CVE-2026-33779 | Junos OS: SRX Series: Insufficient certificate verification for device to SD cloud communication | high | 8.3 | - | No | 2026-04-09 |
| CVE-2025-1146 | CrowdStrike Falcon Sensor for Linux TLS Issue | high | 8.1 | - | No | 2025-02-12 |
| CVE-2021-23162 | - | high | 8.1 | - | No | 2021-11-18 |
| CVE-2019-3762 | - | high | 7.5 | - | No | 2020-03-18 |
| CVE-2021-1566 | Cisco Email Security Appliance and Cisco Web Security Appliance Certificate Validation Vulnerability | high | 7.4 | - | No | 2021-06-16 |
| CVE-2026-44852 | Authenticated Remote Code Execution via Arbitrary File Overwrite in the AOS-8 and AOS-10 Web-Based Management Interface | high | 7.2 | - | No | 2026-05-12 |
| CVE-2026-73542 | Multiple SEIKO EPSON printers and scanners keep already revoked root certificates | medium | 6.3 | - | No | 2026-08-20 |
| CVE-2021-44532 | nodejs: Certificate Verification Bypass via String Injection | medium | 5.3 | - | No | 2022-02-24 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-295](https://radicalnotion.ai/cwe/cwe-295) | Improper Certificate Validation |
| Parent | [CWE-573](https://radicalnotion.ai/cwe/cwe-573) | Improper Following of Specification by Caller |
| Peer | [CWE-370](https://radicalnotion.ai/cwe/cwe-370) | Missing Check for Certificate Revocation after Initial Check |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| CLASP | Failure to follow chain of trust in certificate validation | - | - |

## Frequently asked questions

### What is CWE-296?

The product does not follow, or incorrectly follows, the chain of trust for a certificate back to a trusted root certificate.

### What CVEs are caused by CWE-296?

15 recorded CVEs are attributed to CWE-296, including CVE-2026-96770, CVE-2025-48057 and CVE-2021-23155.

### How do you prevent CWE-296?

Ensure that proper certificate checking is included in the system design.

### How is CWE-296 detected?

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

### What are the consequences of CWE-296?

Exploiting CWE-296 can lead to: Hide Activities, Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands.

### Is CWE-296 actively exploited?

15 recorded CVEs are caused by CWE-296; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/296.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-296). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
