---
title: "CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere"
url: https://radicalnotion.ai/cwe/cwe-497
type: cwe
description: "The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 464
- **Of those, in CISA KEV:** 1
- **New in 2026:** 216
- **CWE catalog version:** 4.21

## Description

The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does.

## Background

Network-based products, such as web applications, often run on top of an operating system or similar environment. When the product communicates with outside parties, details about the underlying system are expected to remain hidden, such as path names for data files, other OS users, installed packages, the application environment, etc. This system information may be provided by the product itself, or buried within diagnostic or debugging messages.

## Applicable platforms

**Languages:** Go (Undetermined)

**Technologies:** Web Based (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Application Data | - |

## Potential mitigations

### Architecture and Design, Implementation

Production applications should never use methods that generate internal details such as stack traces and error messages unless that information is directly committed to a log that is not viewable by the end user. All error message text should be HTML entity encoded before being written to the log file to protect against potential cross-site scripting attacks against the viewer of the logs

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

The following code prints the path environment variable to the standard error stream:

Bad code:

```c
char* path = getenv("PATH");
...
sprintf(stderr, "cannot find exe on path %s\n", path);
```

### Example 2

This code prints all of the running processes belonging to the current user.

Bad code:

```php
//assume getCurrentUser() returns a username that is guaranteed to be alphanumeric (avoiding CWE-78)
$userName = getCurrentUser();
$command = 'ps aux | grep ' . $userName;
system($command);
```

If invoked by an unauthorized web user, it is providing a web page of potentially sensitive information on the underlying system, such as command-line arguments (CWE-497). This program is also potentially vulnerable to a PATH based attack (CWE-426), as an attacker may be able to create malicious versions of the ps or grep commands. While the program does not explicitly raise privileges to run the system commands, the PHP interpreter may by default be running with higher privileges than users.

### Example 3

The following code prints an exception to the standard error stream:

Bad code:

```java
try {
    ...
} catch (Exception e) {
    e.printStackTrace();
}
```

Bad code:

```java
try {
    ...
} catch (Exception e) {
    Console.Writeline(e);
}
```

Depending upon the system configuration, this information can be dumped to a console, written to a log file, or exposed to a remote user. In some cases the error message tells the attacker precisely what sort of an attack the system will be vulnerable to. For example, a database error message can reveal that the application is vulnerable to a SQL injection attack. Other error messages can reveal more oblique clues about the system. In the example above, the search path could imply information about the type of operating system, the applications installed on the system, and the amount of care that the administrators have put into configuring the program.

### Example 4

The following code constructs a database connection string, uses it to create a new connection to the database, and prints it to the console.

Bad code:

```c#
string cs="database=northwind; server=mySQLServer...";
SqlConnection conn=new SqlConnection(cs);
...
Console.Writeline(cs);
```

Depending on the system configuration, this information can be dumped to a console, written to a log file, or exposed to a remote user. In some cases the error message tells the attacker precisely what sort of an attack the system is vulnerable to. For example, a database error message can reveal that the application is vulnerable to a SQL injection attack. Other error messages can reveal more oblique clues about the system. In the example above, the search path could imply information about the type of operating system, the applications installed on the system, and the amount of care that the administrators have put into configuring the program.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2021-32638 | Code analysis product passes access tokens as a command-line parameter or through an environment variable, making them visible to other processes via the ps command. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2021-31955 | Windows Kernel Information Disclosure Vulnerability | medium | 6.8 | - | Yes | 2021-06-08 |
| CVE-2025-10264 | Digiever｜NVR - Exposure of Sensitive Information | critical | 10.0 | - | No | 2025-09-12 |
| CVE-2025-47699 | - | critical | 9.9 | - | No | 2025-10-23 |
| CVE-2025-44823 | - | critical | 9.9 | - | No | 2025-10-07 |
| CVE-2025-6561 | Hunt Electronic Hybrid DVR - Exposure of Sensitive System Information | critical | 9.8 | - | No | 2025-06-26 |
| CVE-2025-1144 | Quanxun School Affairs System - Exposure of Sensitive Information | critical | 9.8 | - | No | 2025-02-11 |
| CVE-2024-36554 | - | critical | 9.8 | - | No | 2025-02-06 |
| CVE-2020-25179 | Exposure of Sensitive System Information to an Unauthorized Control Sphere in GE Healthcare Imaging and Ultrasound Products | critical | 9.8 | - | No | 2020-12-14 |
| CVE-2025-11545 | - | critical | 9.5 | - | No | 2025-12-22 |
| CVE-2026-14808 | PROG MIS｜Prog Management System - Exposure of Sensitive Information | critical | 9.3 | - | No | 2026-07-06 |
| CVE-2025-5893 | Honding Technology Smart Parking Management System - Exposure of Sensitive Information | critical | 9.3 | - | No | 2025-06-09 |
| CVE-2023-32550 | Landscape's Apache server-status is accessible by default | critical | 9.3 | - | No | 2023-06-06 |

## Related attack patterns (CAPEC)

- [CAPEC-170](https://radicalnotion.ai/capec/capec-170): Web Application Fingerprinting
- [CAPEC-694](https://radicalnotion.ai/capec/capec-694): System Location Discovery

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-200](https://radicalnotion.ai/cwe/cwe-200) | Exposure of Sensitive Information to an Unauthorized Actor |
| Child | [CWE-214](https://radicalnotion.ai/cwe/cwe-214) | Invocation of Process Using Visible Sensitive Information |
| Child | [CWE-548](https://radicalnotion.ai/cwe/cwe-548) | Exposure of Information Through Directory Listing |
| Peer | [CWE-1431](https://radicalnotion.ai/cwe/cwe-1431) | Driving Intermediate Cryptographic State/Results to Hardware Module Outputs |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | System Information Leak | - | - |
| The CERT Oracle Secure Coding Standard for Java (2011) | Do not allow exceptions to expose sensitive information | ERR01-J | - |
| Software Fault Patterns | Exposed Data | SFP23 | - |
| OWASP Golang Secure Coding Practices Guide | System Configuration | - | - |

## Frequently asked questions

### What is CWE-497?

The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does.

### What CVEs are caused by CWE-497?

464 recorded CVEs are attributed to CWE-497, including CVE-2021-31955, CVE-2025-10264 and CVE-2025-47699. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### Is CWE-497 part of the OWASP Top 10?

CWE-497 maps to OWASP Golang Secure Coding Practices Guide: System Configuration in the OWASP security taxonomy.

### How do you prevent CWE-497?

Production applications should never use methods that generate internal details such as stack traces and error messages unless that information is directly committed to a log that is not viewable by the end user. All error message text should be HTML entity encoded before being written to the log file to protect against potential cross-site scripting attacks against the viewer of the logs

### How is CWE-497 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-497?

Exploiting CWE-497 can lead to: Read Application Data.

### Is CWE-497 actively exploited?

Yes. 1 CWE-497 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 464 recorded CVEs.

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

---

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