CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory
The product places sensitive information into files or directories that are accessible to actors who are allowed to have access to the files, but not to the sensitive information.
Last updated
Overview
CWE-538 (Insertion of Sensitive Information into Externally-Accessible File or Directory) 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
80 recorded CVEs are caused by CWE-538 (Insertion of Sensitive Information into Externally-Accessible File or Directory). The highest-severity and most recent are shown first. 25 new CWE-538 CVEs have been recorded so far in 2026 (22 in 2025).
- CVE-2023-28444Critical · CVSS 9.9 · EPSS 53th2023-03-24
- CVE-2025-12059
Improper Access Control in Logo Software's Logo j-Platform
Critical · CVSS 9.8 · EPSS 23th2026-02-11 - CVE-2024-22433Critical · CVSS 9.8 · EPSS 48th2024-02-01
- CVE-2016-20024
ZKTeco ZKTime.Net 3.0.1.6 Insecure File Permissions Privilege Escalation
Critical · CVSS 9.3 · EPSS 52th2026-03-15 - CVE-2023-46723High · CVSS 8.9 · EPSS 33th2023-10-31
- CVE-2026-49298
Apache Airflow: JWT Token Exposure in KubernetesExecutor Command-Line Arguments
High · CVSS 8.8 · EPSS 40th2026-06-01 - CVE-2026-21672High · CVSS 8.8 · EPSS 13th2026-03-12
- CVE-2023-7062
Advanced File Manager Shortcodes <= 2.4 - Authenticated (Contributor+) Directory Traversal
High · CVSS 8.8 · EPSS 51th2024-07-10 - CVE-2019-15793High · CVSS 8.8 · EPSS 50th2020-04-23
- CVE-2026-46617
Fission runtime pods automount the fission-fetcher service-account token into the user function container, granting function code namespace-wide secret / configmap read
High · CVSS 8.7 · EPSS 27th2026-06-10 - CVE-2026-27173
Apache Airflow CNCF Kubernetes provider: JWT Token Exposure in KubernetesExecutor Command-Line Arguments
High · CVSS 8.7 · EPSS 5th2026-05-19 - CVE-2023-54346
WordPress Plugin Backup Migration 1.2.8 Unauthenticated Database Backup Download
High · CVSS 8.7 · EPSS 23th2026-05-05
Showing 12 of 80 recorded CWE-538 CVEs. Track new ones as they are published and get AI-written analysis and fixes.
Monitor CWE-538 vulnerabilitiesCommon consequences
What can happen when CWE-538 is exploited.
Read Files or Directories
Affects: Confidentiality
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-538, grouped by where in the lifecycle they apply.
Do not expose file and directory information to the user.
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);Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2018-1999036 — SSH password for private key stored in build log
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-538.
- What is CWE-538?
- The product places sensitive information into files or directories that are accessible to actors who are allowed to have access to the files, but not to the sensitive information.
- What CVEs are caused by CWE-538?
- 80 recorded CVEs are attributed to CWE-538, including CVE-2023-28444, CVE-2025-12059, CVE-2024-22433.
- How do you prevent CWE-538?
- Do not expose file and directory information to the user.
- How is CWE-538 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-538?
- Exploiting CWE-538 can lead to: Read Files or Directories.
- Is CWE-538 actively exploited?
- 80 recorded CVEs are caused by CWE-538; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-538) (opens in a new tab)
- CWE-538 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-538
Get alerted the moment a new CWE-538 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.