---
title: "CWE-403: Exposure of File Descriptor to Unintended Control Sphere"
url: https://radicalnotion.ai/cwe/cwe-403
type: cwe
description: "A process does not close sensitive file descriptors before invoking a child process, which allows the child to perform unauthorized I/O operations using those descriptors."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-403: Exposure of File Descriptor to Unintended Control Sphere

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

## Description

A process does not close sensitive file descriptors before invoking a child process, which allows the child to perform unauthorized I/O operations using those descriptors.

## Background

When a new process is forked or executed, the child process inherits any open file descriptors and can perform operations on those descriptors.

## Alternate terms

- **File descriptor leak:** While this issue is frequently called a file descriptor leak, the "leak" term is often used in two different ways - exposure of a resource, or consumption of a resource. Use of this term could cause confusion.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | When the child process has fewer privileges than the parent process, this might introduce a vulnerability if the child process can access the file descriptor but does not have the privileges to access the associated file. |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Applicable platforms

**Languages:** C (Undetermined)

**Operating systems:** Unix (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity | Read Application Data, Modify Application Data | - |

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

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2003-0740 | Server leaks a privileged file descriptor, allowing the server to be hijacked. |
| CVE-2004-1033 | File descriptor leak allows read of restricted files. |
| CVE-2000-0094 | Access to restricted resource using modified file descriptor for stderr. |
| CVE-2002-0638 | Open file descriptor used as alternate channel in complex race condition. |
| CVE-2003-0489 | Program does not fully drop privileges after creating a file descriptor, which allows access to the descriptor via a separate vulnerability. |
| CVE-2003-0937 | User bypasses restrictions by obtaining a file descriptor then calling setuid program, which does not close the descriptor. |
| CVE-2004-2215 | Terminal manager does not properly close file descriptors, allowing attackers to access terminals of other users. |
| CVE-2006-5397 | Module opens a file for reading twice, allowing attackers to read files. |

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-40042 | Pachno 1.0.6 Wiki TextParser XML External Entity Injection | critical | 9.3 | - | No | 2026-04-13 |
| CVE-2025-15114 | Ksenia Security lares Home Automation 1.6 PIN Exposure Vulnerability | critical | 9.3 | - | No | 2025-12-30 |
| CVE-2026-16526 | Pcp: pcp: privilege escalation to root via linux\_sockets pmda vulnerability | high | 8.8 | - | No | 2026-07-30 |
| CVE-2024-58280 | CMSimple 5.15 Remote Command Execution via Extensions Configuration | high | 8.6 | - | No | 2025-12-10 |
| CVE-2024-21626 | runc container breakout through process.cwd trickery and leaked fds | high | 8.4 | - | No | 2024-01-31 |
| CVE-2026-23268 | apparmor: fix unprivileged local user can do privileged policy management | high | 7.8 | - | No | 2026-03-18 |
| CVE-2025-3032 | Leaking file descriptors from the fork server | high | 7.4 | - | No | 2025-04-01 |
| CVE-2026-93206 | PCI/proc: Use file\_ns\_capable() when checking config space read access | medium | 5.5 | - | No | 2026-09-24 |
| CVE-2026-33263 | dovecot: Dovecot: Denial of Service and potential message duplication via connection limit exhaustion | medium | 4.3 | - | No | 2026-08-28 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-402](https://radicalnotion.ai/cwe/cwe-402) | Transmission of Private Resources into a New Sphere |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | UNIX file descriptor leak | - | - |
| CERT C Secure Coding | Ensure files are properly closed when they are no longer needed | FIO42-C | - |
| Software Fault Patterns | Exposed Data | SFP23 | - |

## Frequently asked questions

### What is CWE-403?

A process does not close sensitive file descriptors before invoking a child process, which allows the child to perform unauthorized I/O operations using those descriptors.

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

9 recorded CVEs are attributed to CWE-403, including CVE-2026-40042, CVE-2025-15114 and CVE-2026-16526.

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

Exploiting CWE-403 can lead to: Read Application Data, Modify Application Data.

### Is CWE-403 actively exploited?

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

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

---

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