Introduction
This new feature suggestion comes from a custom rules set dedicated to PHP and Drupal 8 security.
Description
curl's versions of SSL/TLS protocols and cypher suites must be chosen carrefuly and should not be modified at runtime
Impact
Disabeling it exposes the communications to man-in-the-middle attacks.
Noncompliant Code Example
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
Compliant Code Example
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
References
- MITRE CWE-295 - Improper Certificate Validation
- OWASP Top 10 2017 Category A6 - Security Misconfiguration
Type
Vulnerability
Tags
cwe, owasp-a6