Skip to main content
HighAI codeOWASP A02:2021CWE-295

How to fix: SSL Certificate Verification Disabled

The response body contains code patterns that disable SSL/TLS certificate verification (rejectUnauthorized: false, verify=False, InsecureRequestWarning). This is a common AI-generated workaround for TLS errors.

Why it matters

Disabling certificate verification makes every HTTPS connection vulnerable to man-in-the-middle attacks. An attacker on the same network can intercept and modify all traffic, including credentials and sensitive data, without detection.

When AI tools hit TLS errors during development (self-signed certs, expired certs), they commonly suggest `rejectUnauthorized: false` or `verify=False`. This fix works immediately but creates a critical vulnerability if shipped to production.

How to fix it

  1. 1Never set rejectUnauthorized: false or verify=False in production code.
  2. 2For self-signed certs in development: add the CA cert to NODE_EXTRA_CA_CERTS or requests' ca parameter instead.
  3. 3Use proper TLS certificates (Let's Encrypt is free) in staging and production.
  4. 4Add a lint rule or pre-commit hook that blocks rejectUnauthorized: false.

Code examples

Fix for Node.js HTTPS

JavaScript
// Bad (AI-generated workaround)
const agent = new https.Agent({ rejectUnauthorized: false });

// Good: use proper cert or custom CA
const agent = new https.Agent({
  ca: fs.readFileSync('/path/to/ca.crt'),
});

References

Detected automatically by VulnRadar. The check id is vibe-disabled-ssl-verify, stable across every scan so you can filter or diff on it.

See every ai code check

Questions

How severe is SSL Certificate Verification Disabled?
VulnRadar rates this high severity in the ai code category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id vibe-disabled-ssl-verify, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does SSL Certificate Verification Disabled map to?
It maps to CWE-295. In the OWASP Top 10 it falls under A02:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for ssl certificate verification disabled

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

SSL Certificate Verification Disabled fix | VulnRadar