Skip to content

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

BaseLikelihood of exploit: Low

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.

Consequences

  • Non-Repudiation: Hide Activities
  • Integrity, Confidentiality, Availability, Access Control: Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands

How to prevent it

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

Recent advisories

  • GHSA-gvrj-cjch-728p — Juju has Improper TLS Client/Server authentication and certificate verification on Database Cluster

All advisories for CWE-296

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor