Skip to main content

Use of insecure channel - Source code

Description

Customer information is transmitted over a channel that does not use encryption.

Impact

  • Capture sensitive information and credentials in plain text.
  • Intercept communication and steal or forge requests and responses.

Recommendation

Deploy the application over an encrypted communication channel, e.g. HTTPS using TLS.

Threat

Anonymous attacker in adjacent network executing a man-in-the-middle attack.

Expected Remediation Time

⌚ 60 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: A
  • Attack complexity: H
  • Privileges required: N
  • User interaction: R
  • Scope: U
  • Confidentiality: L
  • Integrity: L
  • Availability: N

Temporal

  • Exploit code madurity: P
  • Remediation level: O
  • Report confidence: X

Result

  • Vector string: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P/RL:O/RC:X
  • Score:
    • Base: 3.7
    • Temporal: 3.4
  • Severity:
    • Base: Low
    • Temporal: Low

Code Examples

Compliant code

All services use a secure encryption method

http {
server {
index: "index.html";
listen: "localhost:4446 ssl";
server_name: "localhost";
ssl_prefer_server_ciphers: "on";
ssl_ciphers: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384";
ssl_certificate: "cert.crt";
ssl_certificate_key: "cert.key";
ssl_protocols: "SSLv3 TLSv1.2";
}
}

Non compliant code

The service uses an insecure encryption method (CBC)

http {
server {
index: "index.html";
listen: "localhost:4446 ssl";
server_name: "localhost";
ssl_prefer_server_ciphers: "off";
ssl_ciphers: "DH_anon_WITH_CAMELLIA_128_CBC_SHA";
ssl_certificate: "cert.crt";
ssl_certificate_key: "cert.key";
ssl_protocols: "SSLv1.0";
}
}

Requirements