Skip to content

Cleartext transmission of sensitive information

Description

The application uses a telnet library, which does not provide encryption. It is strongly recommended to use a more secure transport such as SSH.

Examples

Insecure Code

python
import telnetlib

Secure Code

python
import paramiko
import scp
with paramiko.SSHClient() as ssh:
    ssh.load_system_host_keys('/home/appuser/.ssh/known_hosts')
    ssh.connect(hostname='example.org', port=22, username='appuser', key_filename='/home/appuser/.ssh/private_key')

Remediation

Replace the telnet library with a secure alternative like paramiko for SSH connections.

Rule Details

FieldValue
IDCODE-0168
CategoryInsecureConfig
SeverityMEDIUM
CWECWE-319
ConfidenceHIGH
ImpactHIGH
LikelihoodMEDIUM
ExploitabilityEASY
Tagscleartext transmission, sensitive information
OWASPA3:2017-Sensitive Data Exposure, A02:2021-Cryptographic Failures