---
title: "CWE-54: Path Equivalence: 'filedir\\' (Trailing Backslash)"
url: https://radicalnotion.ai/cwe/cwe-54
type: cwe
description: "The product accepts path input in the form of trailing backslash ('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-54: Path Equivalence: 'filedir\\' (Trailing Backslash)

- **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 trailing backslash ('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 | - |
| Porting | - |

## Applicable platforms

**Operating systems:** Windows (Undetermined)

## Common consequences

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

## Potential mitigations

### Implementation (Input Validation)

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2004-0847 | web framework for .NET allows remote attackers to bypass authentication for .aspx files in restricted directories via a request containing a (1) "\\" (backslash) or (2) "%5C" (encoded backslash) |
| CVE-2004-0061 | Bypass directory access restrictions using trailing dot in URL |

## Related weaknesses

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

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | filedir\\ (trailing backslash) | - | - |
| Software Fault Patterns | Path Traversal | SFP16 | - |

## Frequently asked questions

### What is CWE-54?

The product accepts path input in the form of trailing backslash ('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.

### How do you prevent CWE-54?

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

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

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

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

---

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