CWE-641Improper Restriction of Names for Files and Other Resources

PUBLISHEDweakness recordLow
released 2008-01-30 · last modified 2025-12-11

Metadata

CWE ID:
CWE-641
摘要:
Base
结构:
Simple
状态:
Incomplete
发布日期:
2008-01-30
更新日期:
2025-12-11

名称

Improper 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.

常见后果

范围:
Integrity, Confidentiality, Availability
影响:
Execute Unauthorized Code or Commands
注释:
Execution of arbitrary code in the context of usage of the resources with dangerous names.
范围:
Confidentiality, Availability
影响:
Read Application Data, DoS: Crash, Exit, or Restart
注释:
Crash of the consumer code of these resources resulting in information leakage or denial of service.

相关 CWE