diff --git a/advisories/github-reviewed/2024/06/GHSA-6j89-frxc-q26m/GHSA-6j89-frxc-q26m.json b/advisories/github-reviewed/2024/06/GHSA-6j89-frxc-q26m/GHSA-6j89-frxc-q26m.json new file mode 100644 index 00000000000..09d795d8a0c --- /dev/null +++ b/advisories/github-reviewed/2024/06/GHSA-6j89-frxc-q26m/GHSA-6j89-frxc-q26m.json @@ -0,0 +1,65 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-6j89-frxc-q26m", + "modified": "2024-06-12T19:38:02Z", + "published": "2024-06-12T19:38:01Z", + "aliases": [ + "CVE-2024-29181" + ], + "summary": "@strapi/plugin-content-manager leaks data via relations via the Admin Panel", + "details": "### Summary\n1. If a super admin creates a collection where an item in the collection has an association to another collection, a user with the Author Role can see the list of associated items they did not create. They should only see their own items that they created, not all items ever created.\n\n### Details\nAt the top level every collection shows blank items for an Author if they did not create the item. This is ideal and works great. However if you associate one private collection to another private collection and an Author creates a new item. The pull down should not show the admins list of previously created items. It should be blank unitl they add their own items.\n\n### PoC\n1. Sign in as Admin. Navigate to content creation.\n2. Select a collection and verify you have items you created there. And that they have associations to other protected collections.\n3. Verify role permissions for your collections are set to CRUD if user created.\n4. Log out and sign in as a unrelated Author.\n5. Navigate to content management and verify you see collections built by admin but empty for you (as expected)\n6. Create a new item as an Author and see the card appear with attributes to fill out.\n7. Use the form pull down for the associations.\n8. Notice that protected collection items from Admin appear in drop down. These should be hidden\n\n### Impact\nSecurity vulnerability where authors have access to protected data created by admin. This could be passwords emails or any other item created for the admin's collection. \n\nSee images below for more context\n\nPermissions set\n![image](https://user-images.githubusercontent.com/364910/265132222-66e85726-5e01-4ad3-901a-809270a7f11b.png)\n\nGood at top level no items seen\n![image](https://user-images.githubusercontent.com/364910/265132292-d63fa6df-f32d-48a3-80d0-48a651c570a8.png)\n\nDrop down in Author login can see Admin data\n![image](https://user-images.githubusercontent.com/364910/265132393-8105bae2-b45c-4327-b1c6-da093557e64f.png)\n", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:A/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "npm", + "name": "@strapi/plugin-content-manager" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "4.19.1" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/strapi/strapi/security/advisories/GHSA-6j89-frxc-q26m" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-29181" + }, + { + "type": "WEB", + "url": "https://github.com/strapi/strapi/commit/e1dfd4d9f1cab25cf6da3614c1975e4e508e01c6" + }, + { + "type": "PACKAGE", + "url": "https://github.com/strapi/strapi" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-639" + ], + "severity": "LOW", + "github_reviewed": true, + "github_reviewed_at": "2024-06-12T19:38:01Z", + "nvd_published_at": "2024-06-12T15:15:50Z" + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/06/GHSA-pm9q-xj9p-96pm/GHSA-pm9q-xj9p-96pm.json b/advisories/github-reviewed/2024/06/GHSA-pm9q-xj9p-96pm/GHSA-pm9q-xj9p-96pm.json new file mode 100644 index 00000000000..30d2e9ec86a --- /dev/null +++ b/advisories/github-reviewed/2024/06/GHSA-pm9q-xj9p-96pm/GHSA-pm9q-xj9p-96pm.json @@ -0,0 +1,65 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-pm9q-xj9p-96pm", + "modified": "2024-06-12T19:38:24Z", + "published": "2024-06-12T19:38:24Z", + "aliases": [ + "CVE-2024-31217" + ], + "summary": "@strapi/plugin-upload has a Denial-of-Service via Improper Exception Handling", + "details": "### 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 > URL > 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 ()\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", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H" + } + ], + "affected": [ + { + "package": { + "ecosystem": "npm", + "name": "@strapi/plugin-upload" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "4.22.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/strapi/strapi/security/advisories/GHSA-pm9q-xj9p-96pm" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-31217" + }, + { + "type": "WEB", + "url": "https://github.com/strapi/strapi/commit/a0da7e73e1496d835fe71a2febb14f70170135c7" + }, + { + "type": "PACKAGE", + "url": "https://github.com/strapi/strapi" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-248" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2024-06-12T19:38:24Z", + "nvd_published_at": "2024-06-12T15:15:51Z" + } +} \ No newline at end of file