# CVE-2026-22707: Strapi Upload Plugin MIME Validation Bypass via Content API

> Authenticated users can bypass MIME restrictions to upload malicious files, leading to admin session hijacking and code execution.

- **Severity:** Medium 5.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 May 2026
- **Updated:** 14 May 2026
- **Also known as:** GHSA-pcw7-5633-82vv

## What is CVE-2026-22707?

CVE-2026-22707 is a medium-severity vulnerability in @strapi/upload, published on 14 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Strapi is an open source headless content management system. In Strapi versions prior to 5.33.3, the Upload plugin's Content API endpoints did not enforce the administrator-configured MIME type restrictions (`plugin.upload.security.allowedTypes` and `deniedTypes`). The same restrictions were correctly enforced on the Admin Panel upload path. The upload plugin's `enforceUploadSecurity` security check was invoked in the admin upload controller but was missing from the Content API controller. The Content API handlers `uploadFiles` and `replaceFile` (and the `upload` wrapper that dispatches to them) called the underlying upload service directly, bypassing both the magic-byte MIME detection and the configured allow/deny lists. An authenticated user with the Content API upload permission could therefore upload file types the administrator had explicitly disallowed, including HTML and SVG content. In deployments serving uploaded files from the same origin as the admin panel (default), an attacker could upload an HTML or SVG file that, when opened directly by an admin, executed JavaScript in the admin origin, enabling admin-session hijack and authenticated administrative actions against the admin API. The patch in version 5.33.3 introduces a shared `prepareUploadRequest` helper that wraps `enforceUploadSecurity` and is called from both the Content API and admin upload controllers, ensuring identical security policy enforcement on every upload entry point.

Weakness: CWE-693 (Protection Mechanism Failure), CWE-434 (Unrestricted Upload of File with Dangerous Type)

## Which versions are affected by CVE-2026-22707?

2 open source packages ship an affected version, including @strapi/upload. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@strapi/upload` | npm | All versions | 5.33.3 |
| `@strapi/upload` | npm | All versions | 5.33.3 |

Products: Strapi Strapi.

## How do I fix CVE-2026-22707?

Upgrade @strapi/upload to 5.33.3 or later.

## Is CVE-2026-22707 being exploited?

There is no known exploitation of CVE-2026-22707 in the wild and no public exploit code.

## Other vulnerabilities in @strapi/upload

- [CVE-2023-22894](https://insights.sbomify.com/CVE-2023-22894/): Strapi Cleartext Storage of Sensitive Information (high 7.2, exploited in the wild)
- [CVE-2023-22621](https://insights.sbomify.com/CVE-2023-22621/): Strapi plugins vulnerable to Server-Side Template Injection and Remote Code Execution in the Users-Permissions Plugin (critical 10.0)
- [CVE-2022-27263](https://insights.sbomify.com/CVE-2022-27263/): Unrestricted Upload of File with Dangerous Type in Strapi (critical 9.8)
- [CVE-2020-27664](https://insights.sbomify.com/CVE-2020-27664/): Authorization bypass in Strapi (critical 9.8)
- [CVE-2019-18818](https://insights.sbomify.com/CVE-2019-18818/): Strapi allows unauthenticated attacker to reset admin password without valid reset token (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-22707 and fix it if it is affected.

What it is: CVE-2026-22707 is a medium-severity vulnerability in @strapi/upload, published on 14 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-22707 in the wild and no public exploit code.

Affected packages and fixed versions:
- @strapi/upload (npm): affected all versions; fixed in 5.33.3
- @strapi/upload (npm): affected all versions; fixed in 5.33.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-22707/ (Markdown: https://insights.sbomify.com/CVE-2026-22707/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-22707
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-22707
- OSV: https://osv.dev/vulnerability/CVE-2026-22707

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-22707/
Summaries are generated and may contain mistakes; the official description above is the record.
