Tag Archives: Insertion of Sensitive Information into Log File

CWE-532 – Insertion of Sensitive Information into Log File

Read Time:48 Second

Description

Information written to log files can be of a sensitive nature and give valuable guidance to an attacker or expose sensitive user information.

Modes of Introduction:

– Architecture and Design

 

Likelihood of Exploit: Medium

 

Related Weaknesses

CWE-538
CWE-200

 

Consequences

Confidentiality: Read Application Data

Logging sensitive user data often provides attackers with an additional, less-protected path to acquiring the information.

 

Potential Mitigations

Phase: Architecture and Design, Implementation

Description: 

Consider seriously the sensitivity of the information written into log files. Do not write secrets into the log files.

Phase: Distribution

Description: 

Remove debug log files before deploying the application into production.

Phase: Operation

Description: 

Protect log files against unauthorized read/write.

Phase: Implementation

Description: 

Adjust configurations appropriately when software is transitioned from a debug state to production.

CVE References

  • CVE-2017-9615
    • verbose logging stores admin credentials in a world-readablelog file