---
title: "CWE-47: Path Equivalence: ' filename' (Leading Space)"
url: https://radicalnotion.ai/cwe/cwe-47
type: cwe
description: "The product accepts path input in the form of leading space (' filedir') without appropriate validation, which can lead to ambiguous path resolution and allow an attacker to traverse the file system to unintended locations or access arbitrary files."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-47: Path Equivalence: ' filename' (Leading Space)

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

## Description

The product accepts path input in the form of leading space (' filedir') without appropriate validation, which can lead to ambiguous path resolution and allow an attacker to traverse the file system to unintended locations or access arbitrary files.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity | Read Files or Directories, Modify Files or Directories | - |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-41](https://radicalnotion.ai/cwe/cwe-41) | Improper Resolution of Path Equivalence |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Leading Space - ' filedir' | - | - |
| Software Fault Patterns | Path Traversal | SFP16 | - |

## Frequently asked questions

### What is CWE-47?

The product accepts path input in the form of leading space (' filedir') without appropriate validation, which can lead to ambiguous path resolution and allow an attacker to traverse the file system to unintended locations or access arbitrary files.

### What are the consequences of CWE-47?

Exploiting CWE-47 can lead to: Read Files or Directories, Modify Files or Directories.

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

---

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