Skip to content
OpenAdvisories

Weakness (CWE)

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

Base Incomplete

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.

More detail

This could be used by attackers to cause the file to be
misclassified and processed in a dangerous fashion, causing
the wrong action to occur.

How to prevent it (1 mitigation)
  1. Architecture and Design

    Make decisions on the server side based on file content and not on file name or extension.

Source: MITRE CWE-646

4 results · Clear filters · Feed

  • High 8.8

    Active Storage: Possible arbitrary file read and remote code execution in Active Storage video previews, analysis and image processing

    Active Storage makes it simple to upload and reference files in cloud services and attach those files to Active Record objects. Prior to 8.1.4.1 and 8.0.5.2, ActiveStorage::Blob#open writes a blob to a tempfile whose name carries the extension of the uploaded…

  • High 8.7

    Open WebUI: Stored XSS via attacker-controlled file extension in /api/v1/audio/transcriptions

    Open WebUI is a self-hosted artificial intelligence platform designed to operate entirely offline. Prior to 0.9.3, the audio transcription upload endpoint takes the file extension from the user-supplied filename and saves the file under CACHE_DIR/audio/transc…

  • High 8.7

    Maho Vulnerable to Authenticated Remote Code Execution via File Upload

    Maho is a free and open source ecommerce platform. In Maho prior to 25.9.0, an authenticated staff user with access to the `Dashboard` and `Catalog\Manage Products` permissions can create a custom option on a listing with a file input field. By allowing file …

  • High 7.5

    WordPress Download Manager <= 3.1.24 Authenticated Arbitrary File Upload

    Authenticated File Upload in WordPress Download Manager <= 3.1.24 allows authenticated (Author+) users to upload files with a double extension, e.g. "payload.php.png" which is executable in some configurations. This issue affects: WordPress Download Manager v…