The product writes sensitive information to a log file.
Last updated
CWE-532 (Insertion of Sensitive Information into Log File) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
718 recorded CVEs are caused by CWE-532 (Insertion of Sensitive Information into Log File), including 2 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 104 new CWE-532 CVEs have been recorded so far in 2026 (163 in 2025).
Acer Wave 7 router: Broken Access Control
Showing 12 of 718 recorded CWE-532 CVEs. Track new ones as they are published and get AI-written analysis and fixes.
Monitor CWE-532 vulnerabilitiesWhat can happen when CWE-532 is exploited.
Read Application Data
Affects: Confidentiality
Logging sensitive user data, full path names, or system information often provides attackers with an additional, less-protected path to acquiring the information.
Typically introduced during these phases of the software lifecycle.
Practical mitigations for CWE-532, grouped by where in the lifecycle they apply.
Consider seriously the sensitivity of the information written into log files. Do not write secrets into the log files.
Remove debug log files before deploying the application into production.
Protect log files against unauthorized read/write.
Adjust configurations appropriately when software is transitioned from a debug state to production.
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Illustrative examples from MITRE showing how the weakness appears in code.
In the following code snippet, a user's full name and credit card number are written to a log file.
Vulnerable example
logger.info("Username: " + usernme + ", CCN: " + ccn);This code stores location information about the current user:
Vulnerable example
...
locationClient = new LocationClient(this, this, this);When the application encounters an exception it will write the user object to the log. Because the user object contains location information, the user's location is also written to the log.
In the example below, the method getUserBankAccount retrieves a bank account object from a database using the supplied username and account number to query the database. If an SQLException is raised when querying the database, an error message is created and output to a log file.
Vulnerable example
public BankAccount getUserBankAccount(String username, String accountNumber) {The error message that is created includes information about the database query that may contain sensitive information about the database or query logic. In this case, the error message will expose the table name and column names used in the database. This data could be used to simplify other attacks, such as SQL injection (CWE-89) to directly access the database.
Real CVEs that MITRE cites as examples of this weakness.
CAPEC attack patterns that exploit this weakness.
Common questions about CWE-532.
The product writes sensitive information to a log file.
718 recorded CVEs are attributed to CWE-532, including CVE-2023-21492, CVE-2025-24984, CVE-2026-49200. 2 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
Consider seriously the sensitivity of the information written into log files. Do not write secrets into the log files.
Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Exploiting CWE-532 can lead to: Read Application Data.
Yes. 2 CWE-532 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 718 recorded CVEs.
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get alerted the moment a new CWE-532 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.