CWE-296: Improper Following of a Certificate's Chain of Trust
The product does not follow, or incorrectly follows, the chain of trust for a certificate back to a trusted root certificate.
How it's found
Improper Following of a Certificate's Chain of Trust is typically found by tracing untrusted input from where it enters the system to the point where it is used without the check or neutralization this weakness describes, combining manual code review with dynamic testing.
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
- Hide Activities: Exploitation of this flaw can lead to the trust of data that may have originated with a spoofed source.
- 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.
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.
Where this fits in a TurboPentest engagement
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
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.
How do you find Improper Following of a Certificate's Chain of Trust?
Improper Following of a Certificate's Chain of Trust is typically found by tracing untrusted input from where it enters the system to the point where it is used without the check or neutralization this weakness describes, combining manual code review with dynamic testing.
What is the impact of CWE-296?
Hide Activities: Exploitation of this flaw can lead to the trust of data that may have originated with a spoofed source. 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.
Does TurboPentest test for Improper Following of a Certificate's Chain of Trust?
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Related CWEs
Written and reviewed by
Michel Chamberland - Founder & CEO, IntegSec
CISSP, OSCP, OSCE, CEH, GIAC, CCSK · 20+ years in offensive security
Michel has spent 20+ years on offensive security teams including IBM X-Force Red and Trustwave SpiderLabs, leading penetration tests, red team engagements, and breach response for Fortune 500 customers. He is the founder of IntegSec and the architect of TurboPentest.
Find these issues before an attacker does
TurboPentest runs an agentic AI pentest against your target and reports findings with proof, from $99 per target.
Start a pentest