CVE-2022-27263: Unrestricted Upload of File with Dangerous Type in Strapi

strapi Updated 02 Oct 2025

Summary

13/04/2022
No i
Critical
9.8

CVE-2022-27263: Unrestricted Upload of File with Dangerous Type in Strapi. Affects strapi versions < 4.1.5. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Strapi is an open-source headless CMS (Content Management System) that enables developers to build powerful and customizable APIs. It provides a user-friendly interface for managing content and supports various file upload functionalities. However, a vulnerability has been discovered in Strapi version 4.1.5 that allows attackers to upload arbitrary files with dangerous types, potentially leading to the execution of arbitrary code.

Vulnerability Detail

The vulnerability in Strapi v4.1.5 arises from a lack of proper file type validation during the file upload process. Attackers can exploit this by crafting a malicious file and uploading it to the system. Once uploaded, the file can be executed, enabling the attacker to execute arbitrary code on the server. This can result in various consequences, including unauthorized access, data theft, and remote code execution.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can disable file uploads or implement strict file type validation in their Strapi configuration. This can be achieved by modifying the file upload settings to only allow specific file types that are deemed safe. Here is an example of how to restrict file uploads to only allow image files (JPEG, PNG, GIF):

{
  "upload": {
    "enabled": true,
    "contentTypes": ["image/jpeg", "image/png", "image/gif"]
  }
}

Conclusion

The vulnerability in Strapi v4.1.5 allows attackers to upload and execute arbitrary code on the server, posing significant risks to the security and integrity of affected systems. It is crucial to upgrade to a patched version of Strapi and implement proper file type validation to mitigate this vulnerability. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for strapi →

Share this vulnerability

FAQ

This vulnerability allows attackers to upload and execute arbitrary code on the server, potentially leading to unauthorized access, data theft, and remote code execution.

The vulnerability affects Strapi version 4.1.5. Earlier versions may also be affected, but this has not been confirmed.

Yes, this vulnerability has been assigned the CVE identifier CVE-2022-27263.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to apply the necessary patches and security measures to mitigate the risk.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your Strapi installation is affected by this vulnerability. Simply provide the package-lock.json file of your Strapi project, and Vulert will analyze it for any known vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for strapi.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback