---
title: "CAPEC-649: Adding a Space to a File Extension"
url: https://radicalnotion.ai/capec/capec-649
type: capec
description: "An adversary adds a space character to the end of a file extension and takes advantage of an application that does not properly neutralize trailing special elements in file names. This extra space, which can be difficult for a user to notice, affects which default application is used to operate on the file and can be leveraged by the adversary to control execution."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-649: Adding a Space to a File Extension

- **Abstraction:** Detailed
- **Status:** Draft
- **Typical severity:** Medium
- **Likelihood of attack:** Low
- **CAPEC catalog version:** 3.9

## Description

An adversary adds a space character to the end of a file extension and takes advantage of an application that does not properly neutralize trailing special elements in file names. This extra space, which can be difficult for a user to notice, affects which default application is used to operate on the file and can be leveraged by the adversary to control execution.

## Prerequisites

- The use of the file must be controlled by the file extension.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Availability | Execute Unauthorized Commands | - |

## Mitigations

- File extensions should be checked to see if non-visible characters are being included.

## Related weaknesses (CWE)

- [CWE-46](https://radicalnotion.ai/cwe/cwe-46): Path Equivalence: 'filename ' (Trailing Space)

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-635](https://radicalnotion.ai/capec/capec-635) | Alternative Execution Due to Deceptive Filenames |

## Taxonomy mappings

| Taxonomy | Entry | Id |
| --- | --- | --- |
| ATTACK | Masquerading:Space after Filename | 1036.006 |

## Frequently asked questions

### What is CAPEC-649?

An adversary adds a space character to the end of a file extension and takes advantage of an application that does not properly neutralize trailing special elements in file names. This extra space, which can be difficult for a user to notice, affects which default application is used to operate on the file and can be leveraged by the adversary to control execution.

### How do you prevent CAPEC-649?

File extensions should be checked to see if non-visible characters are being included.

### What weaknesses does CAPEC-649 target?

CAPEC-649 exploits one CWE weakness: CWE-46 (Path Equivalence: 'filename ' (Trailing Space)).

### How severe is CAPEC-649?

MITRE rates CAPEC-649 as Medium severity with low likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/649.html)

---

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