CWE · MITRE source
CWE-641Improper Restriction of Names for Files and Other Resources
The product constructs the name of a file or other resource using input from an upstream component, but it does not restrict or incorrectly restricts the resulting name.
This may produce resultant weaknesses. For instance, if the names of these resources contain scripting characters, it is possible that a script may get executed in the client's browser if the application ever displays the name of the resource on a dynamically generated web page. Alternately, if the resources are consumed by some application parser, a specially crafted name can exploit some vulnerability internal to the parser, potentially resulting in execution of arbitrary code on the server machine. The problems will vary based on the context of usage of such malformed resource names and whether vulnerabilities are present in or assumptions are made by the targeted technology that would make code execution possible.
Last updated: 20 August 2026 13:14 UTC
Control responseHuman-reviewed
Answering this weakness across the control lifecycle, from our framework cross-walks.
—
—
—
NIST 800-53 r5 controls that address this weakness (0)AI-assisted
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2021-41146 UPD | 6.8 | 8.8 | 0.0150 | 2021-10-21 |
CVE-2026-25177 | 6.8 | 8.8 | 0.0124 | 2026-03-10 |
CVE-2022-36302 UPD | 6.6 | 8.8 | 0.0059 | 2022-08-01 |
CVE-2026-27140 UPD | 6.6 | 8.8 | 0.0066 | 2026-04-08 |
CVE-2025-47953 UPD | 6.4 | 8.4 | 0.0051 | 2025-06-10 |
CVE-2025-21361 UPD | 6.0 | 7.8 | 0.0075 | 2025-01-14 |
CVE-2026-50023 | 6.0 | 8.3 | 0.0062 | 2026-06-23 |
CVE-2025-21402 UPD | 5.9 | 7.8 | 0.0065 | 2025-01-14 |
CVE-2025-47173 UPD | 5.9 | 7.8 | 0.0054 | 2025-06-10 |
CVE-2026-46581 | 5.8 | 7.5 | 0.0037 | 2026-08-05 |
CVE-2026-50510 UPD | 5.7 | 7.8 | 0.0023 | 2026-07-14 |
CVE-2023-0046 UPD | 5.6 | 7.2 | 0.0102 | 2023-01-04 |
CVE-2024-30063 UPD | 5.4 | 6.7 | 0.0102 | 2024-06-11 |
CVE-2022-23536 UPD | 5.2 | 6.5 | 0.0075 | 2022-12-19 |
CVE-2024-47260 UPD | 5.1 | 6.5 | 0.0039 | 2025-03-04 |
CVE-2019-25623 | 4.7 | 6.2 | 0.0019 | 2026-03-23 |
CVE-2024-45312 UPD | 4.5 | 5.3 | 0.0048 | 2024-09-02 |