9 vulnerabilities classified as CWE-646 (依赖于外部提供文件的文件名或扩展名). AI Chinese analysis included.
CWE-646 represents a critical input validation weakness where software trusts user-supplied file names or extensions to dictate processing logic. Attackers typically exploit this by uploading malicious files with deceptive extensions, such as renaming a script to appear as a harmless image, thereby bypassing security controls. Once uploaded, the system misclassifies the file, leading to dangerous execution or storage of executable code. Developers mitigate this risk by implementing strict server-side validation that ignores client-provided metadata. Instead, they should analyze the actual file content using magic numbers or MIME type detection to verify the true file format. Additionally, enforcing allowlists for permitted file types and storing uploads in non-executable directories further reduces the attack surface, ensuring that file handling relies on intrinsic properties rather than easily spoofed external identifiers.
Vulnerabilities classified as CWE-646 (依赖于外部提供文件的文件名或扩展名) represent 9 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.