Vulnerabilities in pkg:npm/@strapi/upload

PACKAGE
Advisory Identifier: GHSA-pcw7-5633-82vv
Advisory Summary

CVE-2026-22707 is a MODERATE strapi upload plugin mime validation vulnerability (CWE-693: Protection Mechanism Failure) affecting @strapi/upload libraries in the npm ecosystem. The issue involves strapi upload plugin mime validation bypass via content api. Remediation is available by upgrading affected packages to version 5.33.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@strapi/upload

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@strapi/upload. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pcw7-5633-82vv CVE-2026-22707 MODERATE Strapi Upload Plugin MIME Validation Bypass via Content API

CVE-2026-22707 at a Glance

CVE Identifier CVE-2026-22707
GHSA Identifier GHSA-pcw7-5633-82vv
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-693: Protection Mechanism Failure
Affected Product @strapi/upload
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-22707

To remediate this vulnerability, upgrade all affected @strapi/upload dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@strapi/upload fixed: 5.33.3
npm install @strapi/upload@5.33.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @strapi/upload

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-22707, inspect your project dependencies using npm:

npm ls @strapi/upload

Analyze the terminal output to locate any version of @strapi/upload in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.33.3), your application is affected.

Note: The npm ls @strapi/upload command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In @strapi/upload, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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/upload` where the uploaded file's MIME or extension is outside the configured `allowedTypes` - 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/*.html` or `/uploads/*.svg` shortly 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](https://docs.strapi.io/cms/features/media-library) - [Strapi Security Policy](https://github.com/strapi/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)

CVE-2026-22707 Affected @strapi/upload Versions

1 component(s)
Fixed Versions:
5.33.3
Product / Package Ecosystem Affected Versions Fixed Version
@strapi/upload
npm
< 5.33.3
5.33.3

References

Frequently Asked Questions

What is CVE-2026-22707?
CVE-2026-22707 is a security vulnerability in @strapi/upload involving Strapi Upload Plugin MIME Validation Bypass via Content API under CWE-693: Protection Mechanism Failure.
Which @strapi/upload versions are affected?
Affected versions include releases prior to 5.33.3 across affected packages: @strapi/upload.
What version fixes CVE-2026-22707?
Upgrading to 5.33.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @strapi/upload affected?
Yes, @strapi/upload is affected in releases prior to 5.33.3. Upgrade your dependency to 5.33.3 or later.
What CWE is associated with CVE-2026-22707?
CVE-2026-22707 is classified under CWE-693: Protection Mechanism Failure (The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.).
How can I check npm dependencies for CVE-2026-22707?
Run the dependency tree command: 'npm ls @strapi/upload'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pcw7-5633-82vv",
  "modified" : "2026-05-15T23:44:33Z",
  "published" : "2026-05-14T13:12:56Z",
  "aliases" : [ "CVE-2026-22707" ],
  "summary" : "Strapi Upload Plugin MIME Validation Bypass via Content API",
  "details" : "### Summary of CVE-2026-22707 Vulnerability Details\n\n- CVE: CVE-2026-22707\n- 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)\n- Affected Versions: `@strapi/upload` <=5.33.2\n- How to Patch: Immediately update your Strapi to >=5.33.3\n\n### Description of CVE-2026-22707\n\nIn 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.\n\nThe 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.\n\nAn 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.\n\nThe 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.\n\n### IoC's for CVE-2026-22707\n\nIndicators that an instance running an unpatched version may have been exploited:\n\n- 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)$`\n- Successful 201 responses from `POST /api/upload` where the uploaded file's MIME or extension is outside the configured `allowedTypes`\n- Server access logs showing non-administrator users uploading files with executable web content types. Content-Type regex: `text/html|application/javascript|image/svg\\+xml`\n- Admin browsing logs (X-Forwarded-For, User-Agent) opening files under `/uploads/*.html` or `/uploads/*.svg` shortly before unexpected administrative actions (user creation, role changes, permission modifications)\n\n## References\n\n- **CWE-693**: Protection Mechanism Failure\n- **CWE-434**: Unrestricted Upload of File with Dangerous Type\n- **OWASP**: Unrestricted File Upload\n- [Strapi 5 Documentation - Media Library](https://docs.strapi.io/cms/features/media-library)\n- [Strapi Security Policy](https://github.com/strapi/strapi/security/policy)\n\n## Credits\n\nReported independently by:\n- @kaminuma (initial report, 2026-01-09)\n- @arkmarta (concurrent report, 2026-01-13 — originally filed as GHSA-r7hp-523c-r8wr, closed as duplicate)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/upload"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.33.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.33.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/security/advisories/GHSA-pcw7-5633-82vv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-22707"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-434", "CWE-693" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T13:12:56Z",
    "nvd_published_at" : "2026-05-14T19:16:30Z"
  }
}