Summary
Strapi Upload Plugin MIME Validation Bypass via Content API
Summary of CVE-2026-22707 Vulnerability Details
- CVE: CVE-2026-22707
- CVSS v3.1 Vector:
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(5.3, Medium) - Affected Versions:
@strapi/upload<=5.33.2 - How to Patch: Immediately update your Strapi to >=5.33.3
Description of CVE-2026-22707
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 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.
IoC's for CVE-2026-22707
Indicators that an instance running an unpatched version may have been exploited:
- Files in
/uploads/with extensions outside the configured allow-list, particularly.html,.htm,.svg,.js,.mjs,.xml, or.xhtml. Filesystem regex:\.(html?|svg|m?js|x?html|xml)$ - Successful 201 responses from
POST /api/uploadwhere the uploaded file's MIME or extension is outside the configuredallowedTypes - Server access logs showing non-administrator users uploading files with executable web content types. Content-Type regex:
text/html|application/javascript|image/svg\+xml - Admin browsing logs (X-Forwarded-For, User-Agent) opening files under
/uploads/*.htmlor/uploads/*.svgshortly before unexpected administrative actions (user creation, role changes, permission modifications)
References
- CWE-693: Protection Mechanism Failure
- CWE-434: Unrestricted Upload of File with Dangerous Type
- OWASP: Unrestricted File Upload
- Strapi 5 Documentation - Media Library
- Strapi Security Policy
Credits
Reported independently by:
- @kaminuma (initial report, 2026-01-09)
- @arkmarta (concurrent report, 2026-01-13, originally filed as GHSA-r7hp-523c-r8wr, closed as duplicate)
Impact
The application accepts file uploads without adequately restricting the file type or content. Typical impact: remote code execution if the uploaded file can be served and executed on the server.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-22707? CVE-2026-22707 is a medium-severity unrestricted upload of dangerous file types vulnerability in @strapi/upload (npm), affecting versions <= 5.33.2. It is fixed in 5.33.3. The application accepts file uploads without adequately restricting the file type or content.
- Which versions of @strapi/upload are affected by CVE-2026-22707? @strapi/upload (npm) versions <= 5.33.2 is affected.
- Is there a fix for CVE-2026-22707? Yes. CVE-2026-22707 is fixed in 5.33.3. Upgrade to this version or later.
- Is CVE-2026-22707 exploitable, and should I be worried? Whether CVE-2026-22707 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-22707 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-22707? Upgrade
@strapi/uploadto 5.33.3 or later.