{"id":1297197,"name":"@strapi/plugin-upload","ecosystem":"npm","description":"Makes it easy to upload images and files to your Strapi Application.","homepage":null,"licenses":"SEE LICENSE IN LICENSE","normalized_licenses":["ICU"],"repository_url":"","keywords_array":[],"namespace":"strapi","versions_count":1171,"first_release_published_at":"2023-02-08T00:23:12.288Z","latest_release_published_at":"2026-01-08T11:12:42.686Z","latest_release_number":"4.26.1","last_synced_at":"2026-03-20T21:04:00.644Z","created_at":"2022-04-08T20:02:08.789Z","updated_at":"2026-04-06T12:07:53.209Z","registry_url":"https://www.npmjs.com/package/@strapi/plugin-upload","install_command":"npm install @strapi/plugin-upload","documentation_url":null,"metadata":{"funding":null,"dist-tags":{"rc":"4.4.0-rc.1","alpha":"4.23.1-alpha.0","beta":"5.0.0-beta.5","next":"0.0.0-next.ac2b9fdba5ef59eb22c4e387ac1c5a13dd219f29","latest":"4.25.23","legacy":"4.26.1","experimental":"0.0.0-experimental.edc07cd6c50ff8f7ad14690f5a814f427f6eea15"}},"repo_metadata":null,"repo_metadata_updated_at":null,"dependent_packages_count":25,"downloads":414907,"downloads_period":"last-month","dependent_repos_count":2835,"rankings":{"downloads":0.3975823224715621,"dependent_repos_count":0.42947119634627606,"dependent_packages_count":1.379823770945345,"stargazers_count":null,"forks_count":null,"docker_downloads_count":0.5509003787044962,"average":0.6894444171169198},"purl":"pkg:npm/%40strapi/plugin-upload","advisories":[{"uuid":"GSA_kwCzR0hTQS1wbTlxLXhqOXAtOTZwbc4AA8_D","url":"https://github.com/advisories/GHSA-pm9q-xj9p-96pm","title":"@strapi/plugin-upload  has a Denial-of-Service via Improper Exception Handling","description":"### Summary\nA Denial-of-Service was found in the media upload process causing the server to crash without restarting, affecting either development and production environments.\n\n### Details\nUsually, errors in the application cause it to log the error and keep it running for other clients. This behavior, in contrast, stops the server execution, making it unavailable for any clients until it's manually restarted. \n\n### PoC\nDue to a bug in what we believe to be Burp’s decoding system, we couldn’t produce a valid file to easily reproduce the vulnerability. Instead, the issue can be reproduced by following these steps:\n1. Configure Burp’s proxy between a browser and a Strapi server\n2. Log in and upload an image through the Media Library page while having Burp’s interceptor turned on\n3. After capturing the upload POST request in Burp, add `%00` at the end of the file extension from the `Content-Disposition`, in the filename parameter (See reference image 1 below)\n4. Using the cursor, select the added `%00` and right-click it. Click in Convert selection \u003e URL \u003e URL decode to transform the selected text into a null byte\n5. Forward the modified request. The server should print an error and crash with the error `ERR_INVALID_ARG_VALUE` (See reference log 1 below)\n\nBy following the data flow, we reached the [line of code](https://github.com/strapi/strapi/blob/f1dd5cc8eef574bac6679aab6f93276e57497328/packages/providers/upload-local/src/index.ts#L86) where we believe the DoS is being caused.\nThe simpler way of fixing this vulnerability seems to be avoiding the error thrown by whitelisting the characters used in the extension.\n\n#### Reference Image 1\n![image](https://github.com/strapi/strapi/assets/8593673/c95278a1-1727-485e-b6f8-276074d9dd42)\n\n#### Reference Log 1\n```\n[2024-03-22 10:23:42.629] http: POST /upload (22 ms) 400\nnode:internal/fs/utils:379\n  const err = new ERR_INVALID_ARG_VALUE(\n              ^\n\nTypeError [ERR_INVALID_ARG_VALUE]: The argument 'path' must be a string, Uint8Array, or URL without null bytes. Received '/mnt/storage/Development/GHSA-pm9q-xj9p-96pm/public/uploads/replaceme_png_88efe6a165.png\\x00'\n    at new WriteStream (node:internal/fs/streams:340:5)\n    at Object.createWriteStream (node:fs:3123:10)\n    at /mnt/storage/Development/GHSA-pm9q-xj9p-96pm/node_modules/@strapi/provider-upload-local/dist/index.js:71:33\n    at new Promise (\u003canonymous\u003e)\n    at Object.uploadStream (/mnt/storage/Development/GHSA-pm9q-xj9p-96pm/node_modules/@strapi/provider-upload-local/dist/index.js:68:16)\n    at Object.uploadStream (/mnt/storage/Development/GHSA-pm9q-xj9p-96pm/node_modules/@strapi/plugin-upload/server/register.js:80:35)\n    at Object.upload (/mnt/storage/Development/GHSA-pm9q-xj9p-96pm/node_modules/@strapi/plugin-upload/server/services/provider.js:16:46)\n    at Object.uploadImage (/mnt/storage/Development/GHSA-pm9q-xj9p-96pm/node_modules/@strapi/plugin-upload/server/services/upload.js:220:48) {\n  code: 'ERR_INVALID_ARG_VALUE'\n}\n```\n\n### Impact\nDenial-of-Service occurs when a service becomes unavailable for users or other services.\nBy sending a specially-crafted request, the server crashes without restarting. The entire server crashes with the thrown error instead of crashing only the single request and returning error 500 to the user.\nAny user with access to the file upload functionality is able to exploit this vulnerability, affecting applications running in both development mode and production mode as well.\n","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2024-06-12T19:38:24.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":5.3,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","references":["https://github.com/strapi/strapi/security/advisories/GHSA-pm9q-xj9p-96pm","https://nvd.nist.gov/vuln/detail/CVE-2024-31217","https://github.com/strapi/strapi/commit/a0da7e73e1496d835fe71a2febb14f70170135c7","https://github.com/advisories/GHSA-pm9q-xj9p-96pm"],"source_kind":"github","identifiers":["GHSA-pm9q-xj9p-96pm","CVE-2024-31217"],"repository_url":"https://github.com/strapi/strapi","blast_radius":0.0,"created_at":"2024-06-12T20:05:56.734Z","updated_at":"2026-04-05T20:04:51.481Z","epss_percentage":0.01796,"epss_percentile":0.82508,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1wbTlxLXhqOXAtOTZwbc4AA8_D","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1wbTlxLXhqOXAtOTZwbc4AA8_D","packages":[{"ecosystem":"npm","package_name":"@strapi/plugin-upload","versions":[{"first_patched_version":"4.22.0","vulnerable_version_range":"\u003c 4.22.0"}],"purl":"pkg:npm/%40strapi%2Fplugin-upload"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1wbTlxLXhqOXAtOTZwbc4AA8_D/related_packages","related_advisories":[]}],"docker_usage_url":"https://docker.ecosyste.ms/usage/npm/@strapi/plugin-upload","docker_dependents_count":192,"docker_downloads_count":229710,"usage_url":"https://repos.ecosyste.ms/usage/npm/@strapi/plugin-upload","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/npm/@strapi/plugin-upload/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":null,"versions_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/@strapi%2Fplugin-upload/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/@strapi%2Fplugin-upload/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/@strapi%2Fplugin-upload/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/@strapi%2Fplugin-upload/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/@strapi%2Fplugin-upload/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/@strapi%2Fplugin-upload/codemeta","maintainers":[{"uuid":"pierreburgy","login":"pierreburgy","name":null,"email":"pierre.burgy@gmail.com","url":null,"packages_count":168,"html_url":"https://www.npmjs.com/~pierreburgy","role":null,"created_at":"2022-11-12T00:49:05.037Z","updated_at":"2022-11-12T00:49:05.037Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/pierreburgy/packages"},{"uuid":"aurelsicoko","login":"aurelsicoko","name":null,"email":"aurelsicoko@gmail.com","url":null,"packages_count":176,"html_url":"https://www.npmjs.com/~aurelsicoko","role":null,"created_at":"2022-11-12T00:49:05.043Z","updated_at":"2022-11-12T00:49:05.043Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/aurelsicoko/packages"},{"uuid":"alexandrebodin","login":"alexandrebodin","name":null,"email":"bodin.alex@gmail.com","url":null,"packages_count":212,"html_url":"https://www.npmjs.com/~alexandrebodin","role":null,"created_at":"2022-11-12T00:49:05.059Z","updated_at":"2022-11-12T00:49:05.059Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/alexandrebodin/packages"},{"uuid":"convly","login":"convly","name":null,"email":"jean-sebastien.herbaux@hotmail.fr","url":null,"packages_count":150,"html_url":"https://www.npmjs.com/~convly","role":null,"created_at":"2022-11-12T00:49:05.086Z","updated_at":"2022-11-12T00:49:05.086Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/convly/packages"},{"uuid":"baronvoninternet","login":"baronvoninternet","name":null,"email":"ben.irvin@gmail.com","url":null,"packages_count":150,"html_url":"https://www.npmjs.com/~baronvoninternet","role":null,"created_at":"2024-06-05T09:23:09.206Z","updated_at":"2024-06-05T09:23:09.206Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/baronvoninternet/packages"},{"uuid":"jhoward1994","login":"jhoward1994","name":null,"email":"jhoward1994@gmail.com","url":null,"packages_count":146,"html_url":"https://www.npmjs.com/~jhoward1994","role":null,"created_at":"2026-02-13T20:43:58.155Z","updated_at":"2026-02-13T20:43:58.155Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/jhoward1994/packages"},{"uuid":"marc-roig-strapi","login":"marc-roig-strapi","name":null,"email":"marc.roig.campos@strapi.io","url":null,"packages_count":149,"html_url":"https://www.npmjs.com/~marc-roig-strapi","role":null,"created_at":"2023-04-29T15:53:48.112Z","updated_at":"2023-04-29T15:53:48.112Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/marc-roig-strapi/packages"},{"uuid":"bassel17","login":"bassel17","name":null,"email":"basselkanso82@gmail.com","url":null,"packages_count":138,"html_url":"https://www.npmjs.com/~bassel17","role":null,"created_at":"2026-02-13T20:43:58.234Z","updated_at":"2026-02-13T20:43:58.234Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/bassel17/packages"},{"uuid":"nico-strapi","login":"nico-strapi","name":null,"email":"nicolas.andre@strapi.io","url":null,"packages_count":136,"html_url":"https://www.npmjs.com/~nico-strapi","role":null,"created_at":"2026-02-13T20:43:58.071Z","updated_at":"2026-02-13T20:43:58.071Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/nico-strapi/packages"},{"uuid":"strapi.adzouz","login":"strapi.adzouz","name":null,"email":"adrien.lepoutre@strapi.io","url":null,"packages_count":136,"html_url":"https://www.npmjs.com/~strapi.adzouz","role":null,"created_at":"2026-02-13T20:43:58.110Z","updated_at":"2026-02-13T20:43:58.110Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/maintainers/strapi.adzouz/packages"}]}