Common Weakness Enumeration

CWE-646

Weakness Allowed

Reliance on File Name or Extension of Externally-Supplied File

Abstraction: Base · Status: 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.

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.

Mapping guidance

This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

Relationships and members
ChildOf: CWE-345 · View CWE-1000
PeerOf: CWE-434 (symmetric) · View CWE-1000
Modes of introduction
Architecture and Design Implementation Operation

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.

Content history
Submission: Evgeny Lebanidze · Cigital · 2008-01-30 · CWE Draft 8
Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Common_Consequences, Relationships, Observed_Example

Modification: CWE Content Team · MITRE · 2008-10-13 · CWE 1.1

Significant clarification of the weakness description.

Modification: CWE Content Team · MITRE · 2008-10-14 · CWE 1.0.1

updated Description, Name, Observed_Examples, Relationships

Modification: CWE Content Team · MITRE · 2009-07-27 · CWE 1.5

updated Related_Attack_Patterns

Modification: CWE Content Team · MITRE · 2009-10-29 · CWE 1.6

updated Common_Consequences

Modification: CWE Content Team · MITRE · 2010-12-13 · CWE 1.11

updated Applicable_Platforms, Common_Consequences

Modification: CWE Content Team · MITRE · 2011-03-29 · CWE 1.12

updated Common_Consequences, Description

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated Relationships

Modification: CWE Content Team · MITRE · 2012-10-30 · CWE 2.3

updated Potential_Mitigations

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Relationships

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Enabling_Factors_for_Exploitation

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated Applicable_Platforms, Relationships

Modification: CWE Content Team · MITRE · 2021-10-28 · CWE 4.6

updated Relationships

Modification: CWE Content Team · MITRE · 2023-01-31 · CWE 4.10

updated Description

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Relationships

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Description, Mapping_Notes

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Relationships, Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Common_Consequences, Description, Modes_of_Introduction, Time_of_Introduction, Type, Weakness_Ordinalities

25 vulnerabilities reference this CWE, most recent first.

GHSA-P8CQ-42F6-5Q3J

Vulnerability from github – Published: 2024-07-30 09:32 – Updated: 2024-09-07 00:31
VLAI
Details

Matrix Tafnit v8

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

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-38432"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-345",
      "CWE-646"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-07-30T09:15:03Z",
    "severity": "MODERATE"
  },
  "details": "Matrix\u00a0Tafnit v8\n\n - \n\n\n\nCWE-646: Reliance on File Name or Extension of Externally-Supplied File",
  "id": "GHSA-p8cq-42f6-5q3j",
  "modified": "2024-09-07T00:31:28Z",
  "published": "2024-07-30T09:32:09Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-38432"
    },
    {
      "type": "WEB",
      "url": "https://www.gov.il/en/Departments/faq/cve_advisories"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:L",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-RX97-PWC5-6V32

Vulnerability from github – Published: 2026-05-06 18:30 – Updated: 2026-05-06 18:30
VLAI
Details

A vulnerability in the Lite Agent feature of Cisco Enterprise Chat and Email (ECE) could allow an authenticated, remote attacker to conduct browser-based attacks. To exploit this vulnerability, the attacker must have valid credentials for a user account with at least the role of Agent.

This vulnerability is due to inadequate validation of file contents during file upload operations. An attacker could exploit this vulnerability by uploading a file that contains malicious scripts or HTML code, which the application could make available to other users to access. A successful exploit could allow the attacker to execute the contents of that file in the browser of a user and conduct browser-based attacks. 

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-20172"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-646"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-06T17:16:20Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability in the Lite Agent feature of Cisco Enterprise Chat and Email (ECE) could allow an authenticated, remote attacker to conduct browser-based attacks. To exploit this vulnerability, the attacker must have valid credentials for a user account with at least the role of Agent.\n\nThis vulnerability is due to inadequate validation of file contents during file upload operations. An attacker could exploit this vulnerability by uploading a file that contains malicious scripts or HTML code, which the application could make available to other users to access. A successful exploit could allow the attacker to execute the contents of that file in the browser of a user and conduct browser-based attacks.\u0026nbsp;",
  "id": "GHSA-rx97-pwc5-6v32",
  "modified": "2026-05-06T18:30:31Z",
  "published": "2026-05-06T18:30:31Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-20172"
    },
    {
      "type": "WEB",
      "url": "https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ece-lite-agent-BCgSN8eb"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-V924-7RP8-4MXH

Vulnerability from github – Published: 2026-11-10 21:38 – Updated: 2026-11-10 21:38
VLAI
Summary
Active Storage: Possible arbitrary file read and remote code execution in video previews, analysis and image processing
Details

Impact

ActiveStorage::Blob#open writes a blob to a tempfile whose name carries the extension of the uploaded filename, and hands that path to ffprobe (VideoAnalyzer, AudioAnalyzer), ffmpeg (VideoPreviewer) and ImageMagick (ImageAnalyzer, the :mini_magick variant processor). These tools select a decoder from the file extension when the content does not identify its own format, so an attacker who chooses the filename and declares the content type of an upload chooses which decoder processes it. An FFmpeg built with AviSynth support treats a file with the .avs extension as an AviSynth script and evaluates it, which could disclose files readable by the application process through the preview image, or load a native library the attacker has also uploaded, possibly leading to remote code execution in the FFmpeg process. ImageMagick selects its coders and delegates from the extension in the same way.

Details

The fixed releases keep the uploaded extension on the tempfile only when Marcel maps that extension to the blob's recorded content type, and name the tempfile with no extension otherwise. A form upload whose Rack tempfile fails the same check is copied to a correctly named tempfile before processing. Files whose uploaded extension disagrees with their content type are still processed; the external tool detects their format from the content. The Active Storage CHANGELOG describes the change.

Affected applications

An application is affected if it meets all of these requirements: - Accepts uploads from untrusted users. - Analyzes video or audio attachments (which Active Storage does on attach by default), generates video previews, or processes images with ImageMagick.

The AviSynth attack additionally requires an FFmpeg built with --enable-avisynth and the AviSynthPlus runtime on the host. Upstream FFmpeg and the common Linux distribution and Homebrew packages do not enable it; the GPL builds distributed for Windows and Linux from ffmpeg.org do. Other decoders that FFmpeg or ImageMagick select from the extension may be reachable without AviSynth.

Mitigation

  • Upgrade to a fixed version of activestorage.

Expire and change secrets

Upgrading closes the vulnerability but does not undo a disclosure that already occurred. An application that meets the AviSynth requirement above should treat every secret readable by the application process as potentially exposed and change it, including secret_key_base, the master key and everything in config/credentials.yml.enc that it decrypts, the Active Storage service credentials, database credentials, and tokens for third-party services. Changing secret_key_base expires active sessions and invalidates signed and encrypted cookies, signed global IDs and Active Storage URLs. Do not retain an exposed secret as a fallback.

Workarounds

Applications that cannot upgrade can stop Active Storage from running FFmpeg on uploaded files by removing ActiveStorage::Previewer::VideoPreviewer from config.active_storage.previewers, and ActiveStorage::Analyzer::VideoAnalyzer and ActiveStorage::Analyzer::AudioAnalyzer from config.active_storage.analyzers. Running an FFmpeg built without AviSynth support closes the AviSynth attack but not the extension-selected decoders of ImageMagick.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once: - 8.1: https://github.com/rails/rails/commit/72136ff39153bc8d63ecbc899993848eb3d6573e.patch - 8.0: https://github.com/rails/rails/commit/8106938fb0a595f11006dd1497cd409e27d7d636.patch

Versions affected

  • activestorage < 8.0.5.2
  • activestorage >= 8.1, < 8.1.4.1

Credit

This issue was responsibly reported by HackerOne researcher pirikara.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "activestorage"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.1.0.beta1"
            },
            {
              "fixed": "8.1.4.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "activestorage"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "8.0.5.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-126186"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-646"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-10T21:38:55Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Impact\n`ActiveStorage::Blob#open` writes a blob to a tempfile whose name carries the extension of the uploaded filename, and hands that path to `ffprobe` (`VideoAnalyzer`, `AudioAnalyzer`), `ffmpeg` (`VideoPreviewer`) and ImageMagick (`ImageAnalyzer`, the `:mini_magick` variant processor). These tools select a decoder from the file extension when the content does not identify its own format, so an attacker who chooses the filename and declares the content type of an upload chooses which decoder processes it. An FFmpeg built with AviSynth support treats a file with the `.avs` extension as an AviSynth script and evaluates it, which could disclose files readable by the application process through the preview image, or load a native library the attacker has also uploaded, possibly leading to remote code execution in the FFmpeg process. ImageMagick selects its coders and delegates from the extension in the same way.\n\n### Details\nThe fixed releases keep the uploaded extension on the tempfile only when Marcel maps that extension to the blob\u0027s recorded content type, and name the tempfile with no extension otherwise. A form upload whose Rack tempfile fails the same check is copied to a correctly named tempfile before processing. Files whose uploaded extension disagrees with their content type are still processed; the external tool detects their format from the content. The Active Storage CHANGELOG describes the change.\n\n### Affected applications\nAn application is affected if it meets all of these requirements:\n- Accepts uploads from untrusted users.\n- Analyzes video or audio attachments (which Active Storage does on attach by default), generates video previews, or processes images with ImageMagick.\n\nThe AviSynth attack additionally requires an FFmpeg built with `--enable-avisynth` and the AviSynthPlus runtime on the host. Upstream FFmpeg and the common Linux distribution and Homebrew packages do not enable it; the GPL builds distributed for Windows and Linux from ffmpeg.org do. Other decoders that FFmpeg or ImageMagick select from the extension may be reachable without AviSynth.\n\n### Mitigation\n- Upgrade to a fixed version of `activestorage`.\n\n### Expire and change secrets\nUpgrading closes the vulnerability but does not undo a disclosure that already occurred. An application that meets the AviSynth requirement above should treat every secret readable by the application process as potentially exposed and change it, including `secret_key_base`, the master key and everything in `config/credentials.yml.enc` that it decrypts, the Active Storage service credentials, database credentials, and tokens for third-party services. Changing `secret_key_base` expires active sessions and invalidates signed and encrypted cookies, signed global IDs and Active Storage URLs. Do not retain an exposed secret as a fallback.\n\n### Workarounds\nApplications that cannot upgrade can stop Active Storage from running FFmpeg on uploaded files by removing `ActiveStorage::Previewer::VideoPreviewer` from `config.active_storage.previewers`, and `ActiveStorage::Analyzer::VideoAnalyzer` and `ActiveStorage::Analyzer::AudioAnalyzer` from `config.active_storage.analyzers`. Running an FFmpeg built without AviSynth support closes the AviSynth attack but not the extension-selected decoders of ImageMagick.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\nPatches for those who cannot upgrade at once:\n- 8.1: https://github.com/rails/rails/commit/72136ff39153bc8d63ecbc899993848eb3d6573e.patch\n- 8.0: https://github.com/rails/rails/commit/8106938fb0a595f11006dd1497cd409e27d7d636.patch\n\n### Versions affected\n- activestorage \u003c 8.0.5.2\n- activestorage \u003e= 8.1, \u003c 8.1.4.1\n\n### Credit\nThis issue was responsibly reported by HackerOne researcher [pirikara](https://hackerone.com/pirikara).",
  "id": "GHSA-v924-7rp8-4mxh",
  "modified": "2026-11-10T21:38:55Z",
  "published": "2026-11-10T21:38:55Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/rails/rails/security/advisories/GHSA-v924-7rp8-4mxh"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rails/rails/commit/72136ff39153bc8d63ecbc899993848eb3d6573e"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rails/rails/commit/8106938fb0a595f11006dd1497cd409e27d7d636"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/rails/rails"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rails/rails/releases/tag/v8.0.5.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rails/rails/releases/tag/v8.1.4.1"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/GHSA-v924-7rp8-4mxh.yml"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Active Storage: Possible arbitrary file read and remote code execution in video previews, analysis and image processing"
}

GHSA-VGMM-27FC-VMGP

Vulnerability from github – Published: 2025-09-09 20:52 – Updated: 2025-09-09 20:52
VLAI
Summary
Maho is Vulnerable to Authenticated Remote Code Execution via File Upload
Details

Summary

In Maho 25.7.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 uploads with a .php extension, the user can use the filed to upload malicious PHP files, gaining remote code execution

Details

An user with the Dashboard and Catalog\Manage Products permissions can abuse the product custom options feature to bypass the application’s file upload restrictions.

When creating a product custom option of type file upload, the user is allowed to define their own extension whitelist. This bypasses the application’s normal enforced whitelist and permits disallowed extensions, including .php.

The file uploaded by the custom option is then written to a predictable location:

/public/media/custom_options/<first char of filename>/<second char of filename>/<md5 of file contents>.php

Because this path is directly accessible under the application’s webroot, an attacker can then request the uploaded file via HTTP, causing the server to execute the PHP payload.

PoC

  1. Sign in to the /admin dashboard as a staff user. Ensure the user's role has access to the Dashboard and Catalog\Manage Products permissions.
  2. Navigate to a product catalog listing, for example by clicking on a product linked within the Most Viewed Products tab on the dashboard. image

  3. Navigate to the "Custom Options" tab on the product, and create a custom option with a file upload field. Add .php as an allowed extension to the file upload configuration. Save the configuration after making the changes. image

  4. In a private window, navigate to the customer facing page for the product, and upload a reverse shell PHP file through the newly configured option. Then click "Add to cart" to complete the upload. image

  5. Calculate the location of the uploaded file on the web server as

/public/media/custom_options/<first char of filename>/<second char of filename>/<md5 of file contents>.php
  1. Navigate to the above path directly to execute the file contents and trigger the reverse shell. image

Impact

This vulnerability allows remote code execution (RCE) on the server. It requires only the Catalog\Manage Products permission, and does not need full administrative access. By leveraging the custom option upload feature, an attacker can bypass the application’s normal file upload protections and execute arbitrary PHP code within the webroot.

Suggested Remediation

Enforce a whitelist of allowed extensions a user is allowed to configure for file upload fields in Custom Options.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "mahocommerce/maho"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "25.9.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-58449"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-646"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-09-09T20:52:24Z",
    "nvd_published_at": "2025-09-08T22:15:34Z",
    "severity": "HIGH"
  },
  "details": "### Summary\nIn Maho 25.7.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 uploads with a `.php` extension, the user can use the filed to upload malicious PHP files, gaining remote code execution\n\n### Details\nAn  user with the `Dashboard` and `Catalog\\Manage Products` permissions can abuse the product custom options feature to bypass the application\u2019s file upload restrictions.\n\nWhen creating a product custom option of type file upload, the user is allowed to define their own extension whitelist. This bypasses the application\u2019s normal enforced whitelist and permits disallowed extensions, including `.php`.\n\nThe file uploaded by the custom option is then written to a predictable location:\n```\n/public/media/custom_options/\u003cfirst char of filename\u003e/\u003csecond char of filename\u003e/\u003cmd5 of file contents\u003e.php\n```\nBecause this path is directly accessible under the application\u2019s webroot, an attacker can then request the uploaded file via HTTP, causing the server to execute the PHP payload.\n\n### PoC\n1. Sign in to the `/admin` dashboard as a staff user. Ensure the user\u0027s role has access to the `Dashboard` and `Catalog\\Manage Products` permissions.\n2. Navigate to a product catalog listing, for example by clicking on a product linked within the `Most Viewed Products` tab on the dashboard.\n\u003cimg width=\"648\" height=\"194\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1ab69182-68ea-48e4-b50b-46ccf70f40bb\" /\u003e\n\n3. Navigate to the \"Custom Options\" tab on the product, and create a custom option with a file upload field. Add `.php` as an allowed extension to the file upload configuration. Save the configuration after making the changes.\n\u003cimg width=\"836\" height=\"391\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5abe7d80-c16d-4b54-9a19-799bda1bcc34\" /\u003e\n\n4. In a private window, navigate to the customer facing page for the product, and upload a reverse shell PHP file through the newly configured option. Then click \"Add to cart\" to complete the upload.\n\u003cimg width=\"473\" height=\"286\" alt=\"image\" src=\"https://github.com/user-attachments/assets/326ce37e-026a-4211-8e95-6f5f310727df\" /\u003e\n\n5. Calculate the location of the uploaded file on the web server as \n```\n/public/media/custom_options/\u003cfirst char of filename\u003e/\u003csecond char of filename\u003e/\u003cmd5 of file contents\u003e.php\n```\n6. Navigate to the above path directly to execute the file contents and trigger the reverse shell.\n\u003cimg width=\"910\" height=\"339\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e0e52607-81d5-4dc2-8550-ef324182f889\" /\u003e\n\n### Impact\nThis vulnerability allows remote code execution (RCE) on the server. It requires only the Catalog\\Manage Products permission, and does not need full administrative access. By leveraging the custom option upload feature, an attacker can bypass the application\u2019s normal file upload protections and execute arbitrary PHP code within the webroot.\n\n### Suggested Remediation\nEnforce a whitelist of allowed extensions a user is allowed to configure for file upload fields in Custom Options.",
  "id": "GHSA-vgmm-27fc-vmgp",
  "modified": "2025-09-09T20:52:24Z",
  "published": "2025-09-09T20:52:24Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MahoCommerce/maho/security/advisories/GHSA-vgmm-27fc-vmgp"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-58449"
    },
    {
      "type": "WEB",
      "url": "https://github.com/MahoCommerce/maho/commit/db54a1b44e9b3fd26b27ca4d5ece0af99c4dcb53"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/MahoCommerce/maho"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Maho is Vulnerable to Authenticated Remote Code Execution via File Upload"
}

GHSA-W5W3-25G6-2M2X

Vulnerability from github – Published: 2022-05-24 19:10 – Updated: 2025-03-21 18:31
VLAI
Details

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 version 3.1.24 and prior versions.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-34639"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-434",
      "CWE-646"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-08-05T21:15:00Z",
    "severity": "HIGH"
  },
  "details": "Authenticated File Upload in WordPress Download Manager \u003c= 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 version 3.1.24 and prior versions.",
  "id": "GHSA-w5w3-25g6-2m2x",
  "modified": "2025-03-21T18:31:17Z",
  "published": "2022-05-24T19:10:04Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-34639"
    },
    {
      "type": "WEB",
      "url": "https://www.wordfence.com/blog/2021/07/wordpress-download-manager-vulnerabilities"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation
Architecture and Design

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

CAPEC-209: XSS Using MIME Type Mismatch

An adversary creates a file with scripting content but where the specified MIME type of the file is such that scripting is not expected. The adversary tricks the victim into accessing a URL that responds with the script file. Some browsers will detect that the specified MIME type of the file does not match the actual type of its content and will automatically switch to using an interpreter for the real content type. If the browser does not invoke script filters before doing this, the adversary's script may run on the target unsanitized, possibly revealing the victim's cookies or executing arbitrary script in their browser.