Skip to main content

Non-encrypted confidential information - Keys

Description

Confidential information is stored in plain text allowing an attacker to view it without any encryption.

Impact

Obtain sensitive information that can compromise system resources.

Recommendation

Encrypt all sensitive information that is transported or stored within the application according to the organizations policies.

Threat

Attacker with access to source code from the Internet.

Expected Remediation Time

⌚ 30 minutes.

Score

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

Base

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

Temporal

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

Result

  • Vector string: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N/E:P/RL:X/RC:X
  • Score:
    • Base: 4.3
    • Temporal: 4.1
  • Severity:
    • Base: Medium
    • Temporal: Medium

Code Examples

Compliant code

All sensitive credentials are stored as encrypted secrets

import { initializeDB } from db_model;

const firebaseConfig = {
//Get encrypted keys from the server
};

async function getUsers(db) {
....
}

Non compliant code

There are sensitive credentials stored in the source code

import { initializeDB } from db_model;

const firebaseConfig = {
const ADMIN = "admin";
const PASSWORD = "1234"
};

async function getUsers(db) {
....
}

Requirements

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.