Skip to content

Cleartext transmission of sensitive information

Description

The Sequelize connection string indicates that the database server does not use TLS. Non-TLS connections are susceptible to man-in-the-middle (MITM) attacks.

Examples

Insecure Code

javascript
const sequelize = new Sequelize('database', 'username', 'password', { host: 'localhost', dialect: 'mysql' });

Secure Code

javascript
const sequelize = new Sequelize('database', 'username', 'password', { host: 'localhost', dialect: 'mysql', dialectOptions: { ssl: true } });

Remediation

Enable TLS for the database connection by adding 'dialectOptions': {'ssl': true} to the Sequelize connection options.

Rule Details

FieldValue
IDCODE-0362
CategoryInsecureConfig
SeverityMEDIUM
CWECWE-319
ConfidenceHIGH
ImpactHIGH
LikelihoodMEDIUM
ExploitabilityMODERATE
TagsTLS, database security
OWASPA3:2017-Sensitive Data Exposure, A02:2021-Cryptographic Failures