At a glance
- Controls
- CWE-295 · A07:2021 Identification and Authentication Failures
What it is
When a connection fails with a certificate error, a quick fix is to turn the check off. Generated code often suggests this. The connection is still encrypted, but the client no longer knows who it is talking to.
An attacker on the network path presents their own certificate and the client accepts it. They can then read tokens and data or change responses. AI-assisted attackers can search public and leaked code for the common settings that switch checks off.
Where it hides
What a reviewer can look for in the code and in the behaviour, before anyone proves it.
- HTTP clients created with verify=False, rejectUnauthorized: false or InsecureSkipVerify
- Webhook senders and payment or partner integrations
- Database and message queue connections with TLS set to skip verification
- Environment flags such as NODE_TLS_REJECT_UNAUTHORIZED=0 in deployment configs
How MATT tests it
The proof runs against the deployed product, on every release, whoever wrote the code.
- 01Read the code and configuration for settings that disable certificate or hostname checks.
- 02Trace each finding to the outbound connection it affects and the data that connection carries.
- 03Where a test environment allows it, point that connection at a test endpoint with an untrusted certificate and record whether the client connects.
Every outbound connection must verify the server’s certificate.
Executable checkscan code and config: no setting that disables certificate or hostname verification as the service: connect to a test host with a self-signed certificate expect: the connection fails with a certificate error expect: no request body is sent
Every rule MATT holds →What the fix looks like
- 01
Remove every setting that disables certificate or hostname checks.
- 02
Add the correct internal certificate authority to the trust store for private services.
- 03
Use certificate pinning for high‑value integrations where it is practical.
- 04
Add a CI check that fails on known insecure TLS settings.
A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →