1. CVE archive
  2. Vulnerability types
  3. CWE-646
CWE-646 · #477 most frequent type in the archive

Reliance on File Name or Extension of Externally-Supplied File

The product allows a file to be uploaded, but it relies on the file name or extension of the file to determine the appropriate behaviors.

Part of: CWE-345 · Insufficient Verification of Data Authenticity

7CVEs of this type in the archive
1critical (CVSS ≥ 9)
3high severity (7–8.9)
Nov 10, 2026latest published

What it is

The product allows a file to be uploaded, but it relies on the file name or extension of the file to determine the appropriate behaviors.

This could be used by attackers to cause the file to be misclassified and processed in a dangerous fashion, causing the wrong action to occur.

Impact on systems

ScopeImpact
Integrity Execute Unauthorized Code or Commands
If an attacker can provide a file that is treated as executable, then code execution might be possible. For example, in a web application, an attacker could supply a file that ends in a .php.gif extension that appears to be a GIF image, but would be processed as PHP code by the server.
Confidentiality Read Application Data
An attacker may be able to read sensitive data, e.g., exposure of debug or system data (including application source code)
Availability DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Resource Consumption (Other)
An attacker may be able to cause a denial of service.
Access Control Gain Privileges or Assume Identity
An attacker may be able to gain privileges.

How to prevent it

Architecture and Design Make decisions on the server side based on file content and not on file name or extension.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-646 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20241
20254
20262

All CWE-646 CVEs

7 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.