CWE-532: Insertion of Sensitive Information into Log File
The product writes sensitive information to a log file.
Last updated
Overview
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.
Real-world CVEs
781 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. 166 new CWE-532 CVEs have been recorded so far in 2026 (163 in 2025).
- CVE-2023-21492CISA KEVMedium · CVSS 6.7 · EPSS 84th2023-05-04
- CVE-2025-24984CISA KEV
Windows NTFS Information Disclosure Vulnerability
Medium · CVSS 5.1 · EPSS 79th2025-03-11 - CVE-2026-49200
Acer Wave 7 router: Broken Access Control
Critical · CVSS 10.0 · EPSS 42th2026-05-29 - CVE-2022-36407Critical · CVSS 9.9 · EPSS 42th2024-03-25
- CVE-2021-32724Critical · CVSS 9.9 · EPSS 82th2021-09-09
- CVE-2026-22778
vLLM leaks a heap address when PIL throws an error
Critical · CVSS 9.8 · EPSS 89th2026-02-02 - CVE-2025-11008
CE21 Suite <= 2.3.1 - Unauthenticated Sensitive Information Exposure to Privilege Escalation
Critical · CVSS 9.8 · EPSS 37th2025-11-04 - CVE-2024-34706Critical · CVSS 9.8 · EPSS 62th2024-05-13
- CVE-2020-11094
Potential unauthorized access to stored request & session data when plugin is misconfigured in October CMS Debugbar
Critical · CVSS 9.8 · EPSS 62th2020-06-03 - CVE-2019-10212Critical · CVSS 9.8 · EPSS 78th2019-10-02
- CVE-2019-3888Critical · CVSS 9.8 · EPSS 87th2019-06-12
- CVE-2018-1072Critical · CVSS 9.8 · EPSS 60th2018-06-26
Showing 12 of 781 recorded CWE-532 CVEs. Track new ones as they are published and get AI-written analysis and fixes.
Monitor CWE-532 vulnerabilitiesCommon consequences
What 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.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
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.
How to detect it
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.)
Effectiveness: High
Code examples
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.
Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2017-9615 — verbose logging stores admin credentials in a world-readable log file
- CVE-2018-1999036 — SSH password for private key stored in build log
Terminology & mappings
Mapped taxonomies
- The CERT Oracle Secure Coding Standard for Java (2011): Do not log sensitive information outside a trust boundary (FIO13-J)
- Software Fault Patterns: Exposed Data (SFP23)
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-532.
- What is CWE-532?
- The product writes sensitive information to a log file.
- What CVEs are caused by CWE-532?
- 781 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.
- How do you prevent CWE-532?
- Consider seriously the sensitivity of the information written into log files. Do not write secrets into the log files.
- How is CWE-532 detected?
- 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.)
- What are the consequences of CWE-532?
- Exploiting CWE-532 can lead to: Read Application Data.
- Is CWE-532 actively exploited?
- Yes. 2 CWE-532 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 781 recorded CVEs.
References
- MITRE CWE definition (CWE-532) (opens in a new tab)
- CWE-532 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-532
Get alerted the moment a new CWE-532 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.