CWE-646: Reliance on File Name or Extension of Externally-Supplied File

CWE-646 là gì?

CWE-646 là Reliance on File Name or Extension of Externally-Supplied File. Lỗi phát sinh khi 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. Hiện có 3 lỗ hổng trong kho dữ liệu liên quan đến CWE-646 và không có lỗ hổng nào nằm trong danh mục khai thác thực tế của CISA.

Thứ hạng OWASP Top 10 (2025)6 — A06:2025 — Insecure Design
Tổng số CVE liên quan (365 ngày)3
Mức trừu tượngCơ bản
Khả năng khai thácCao

Số lượng lỗ hổng nằm trong CWE-646

3 lỗ hổng

Không có dữ liệu

Chưa có dữ liệu về lỗ hổng trong CISA KEV cho CWE-646

Định nghĩa chính thức

TheoMitre CWE

Đặc điểm

Dữ liệu MITRE CWE chính thức

Giai đoạn hình thành

  • Kiến trúc và thiết kế: 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. (All Phases: Architecture and Design, Implementation, Operation)

Hậu quả thường gặp

Dữ liệu MITRE CWE chính thức
Tác độngPhạm viDiễn giải
Thực thi mã hoặc lệnh trái phépTính toàn vẹnIf 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.
Đọc dữ liệu ứng dụngTính bí mậtAn attacker may be able to read sensitive data, e.g., exposure of debug or system data (including application source code)
Từ chối dịch vụ: sập, thoát hoặc khởi động lại, Từ chối dịch vụ: tiêu thụ tài nguyên CPU, Từ chối dịch vụ: tiêu thụ bộ nhớ, Từ chối dịch vụ: tiêu thụ tài nguyên khácTính sẵn sàngAn attacker may be able to cause a denial of service.
Chiếm đặc quyền hoặc mạo danhKiểm soát truy cậpAn attacker may be able to gain privileges.

Biện pháp giảm thiểu rủi ro

Dữ liệu MITRE CWE chính thức
  1. Kiến trúc và thiết kếMake decisions on the server side based on file content and not on file name or extension.
Nguồn (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Tìm hiểu thêm

Kiểm tra chuyên sâu cùng giải pháp quản lý rủi ro Web toàn diện

Giải pháp CyStack VulnScan liên tục phát hiện tài sản, xác minh lỗ hổng và giúp đội ngũ bảo mật ưu tiên khắc phục cho toàn bộ doanh nghiệp.