CWE · MITRE source
CWE-646Reliance 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. This could be used by attackers to cause the file to be misclassified and processed in a dangerous fashion.
An application might use the file name or extension of a user-supplied file to determine the proper course of action, such as selecting the correct process to which control should be passed, deciding what data should be made available, or what resources should be allocated. If the attacker can cause the code to misclassify the supplied file, then the wrong action could occur. For example, 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. In extreme cases, code execution is possible, but the attacker could also cause exhaustion of resources, denial of service, exposure of debug or system data (including application source code), or being bound to a particular server side process. This weakness may be due to a vulnerability in any of the technologies used by the web and application servers, due to misconfiguration, or resultant from another flaw in the application itself.
Last updated: 04 July 2026 00:28 UTC
Cumulative inbound coverage
How completely the frameworks we cross-walk collectively cover this — the verdict is the strongest single mapping (overlapping partials are not summed); breadth shows the corroboration behind it.
Collective: full · 7 mapping(s) from 2 framework(s): ATT&CK 6 (mostly) · OWASP-Web 1 (full)
OWASP Top 10 for Web (2025)
This weakness contributes to A06:2025 Insecure Design.
NIST 800-53 r5 controls that address this weakness (0)AI
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
MITRE ATT&CK techniques this weakness enables
Our own two-way CWE↔ATT&CK cross-walk — a direct mapping with no public source (the CWE→CAPEC→ATT&CK chain leaves most top weaknesses, incl. XSS and SQLi, mapped to nothing). Drafted by Grok and spot-checked by Claude Opus 4.8.
Direction: ← other covers this;
→ this covers other (F/M/P = full / mostly /
partial).
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2025-1889 | 7.0 | 9.8 | 0.0037 | 2025-03-03 |
CVE-2021-34639 | 5.5 | 7.5 | 0.0058 | 2021-08-05 |
CVE-2024-52052 | 5.5 | 7.2 | 0.0048 | 2024-11-21 |
CVE-2026-45315 UPD | 5.5 | 8.7 | 0.0018 | 2026-05-15 |
CVE-2023-45599 | 3.5 | 5.5 | 0.0022 | 2024-03-05 |
CVE-2024-38432 | 3.5 | 5.5 | 0.0017 | 2024-07-30 |
CVE-2025-41720 | 3.5 | 4.3 | 0.0016 | 2025-10-22 |
CVE-2025-30662 | 3.5 | 6.6 | 0.0011 | 2025-11-13 |
CVE-2026-20172 UPD | 3.5 | 4.3 | 0.0013 | 2026-05-06 |