---
title: "CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory"
url: https://radicalnotion.ai/cwe/cwe-538
type: cwe
description: "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."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 110
- **Of those, in CISA KEV:** 0
- **New in 2026:** 44
- **CWE catalog version:** 4.21

## Description

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.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase. |
| Operation | OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase. |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Files or Directories | - |

## Potential mitigations

### Architecture and Design, Operation, System Configuration

Do not expose file and directory information to the user.

## Detection methods

### 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

## Demonstrative examples

### Example 1

In the following code snippet, a user's full name and credit card number are written to a log file.

Bad code:

```java
logger.info("Username: " + usernme + ", CCN: " + ccn);
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2018-1999036 | SSH password for private key stored in build log |

## Real CVEs with this weakness (sample of 12 of 110)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2023-28444 | angular-server-side-configuration information disclosure vulnerability in monorepo with node.js backend | critical | 9.9 | - | No | 2023-03-24 |
| CVE-2025-12059 | Improper Access Control in Logo Software's Logo j-Platform | critical | 9.8 | - | No | 2026-02-11 |
| CVE-2024-22433 | - | critical | 9.8 | - | No | 2024-02-01 |
| CVE-2026-44828 | Qexo initialization endpoint can reset setup state and expose stored credentials | critical | 9.3 | - | No | 2026-10-12 |
| CVE-2016-20024 | ZKTeco ZKTime.Net 3.0.1.6 Insecure File Permissions Privilege Escalation | critical | 9.3 | - | No | 2026-03-15 |
| CVE-2023-46723 | lte-pic32-writer's sendto.txt may disclose URL and the API key | high | 8.9 | - | No | 2023-10-31 |
| CVE-2026-49298 | Apache Airflow: JWT Token Exposure in KubernetesExecutor Command-Line Arguments | high | 8.8 | - | No | 2026-06-01 |
| CVE-2026-21672 | - | high | 8.8 | - | No | 2026-03-12 |
| CVE-2023-7062 | Advanced File Manager Shortcodes \<= 2.4 - Authenticated (Contributor+) Directory Traversal | high | 8.8 | - | No | 2024-07-10 |
| CVE-2019-15793 | Mishandling of file-system uid/gid with namespaces in shiftfs | high | 8.8 | - | No | 2020-04-23 |
| CVE-2016-20106 | NUUO NVRmini 2 through 3.0.8 File Disclosure via css\_parser.php | high | 8.7 | - | No | 2026-11-18 |
| CVE-2026-126091 | iDentalSoft website information exposure | high | 8.7 | - | No | 2026-11-13 |

## Related attack patterns (CAPEC)

- [CAPEC-95](https://radicalnotion.ai/capec/capec-95): WSDL Scanning

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-200](https://radicalnotion.ai/cwe/cwe-200) | Exposure of Sensitive Information to an Unauthorized Actor |
| Child | [CWE-532](https://radicalnotion.ai/cwe/cwe-532) | Insertion of Sensitive Information into Log File |
| Child | [CWE-540](https://radicalnotion.ai/cwe/cwe-540) | Inclusion of Sensitive Information in Source Code |
| Child | [CWE-651](https://radicalnotion.ai/cwe/cwe-651) | Exposure of WSDL File Containing Sensitive Information |

## Frequently asked questions

### 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?

110 recorded CVEs are attributed to CWE-538, including CVE-2023-28444, CVE-2025-12059 and 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?

110 recorded CVEs are caused by CWE-538; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/538.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-538). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
