{"id":"CVE-2022-32114","aliases":["CVE-2022-32114","GHSA-4vm8-j95f-j6v5"],"related":[],"kind":"vulnerability","state":"published","title":"Strapi 4.1.12 Cross-site Scripting via crafted file","summary":"An unrestricted file upload vulnerability in the Add New Assets function of Strapi 4.1.12 allows attackers to conduct XSS attacks via a crafted PDF file. NOTE: the project documentation suggests that a user with the Media Library \"Create (upload)\" permission is supposed to be able to upload PDF files containing JavaScript, and that all files in a public assets folder are accessible to the outside world (unless the filename begins with a dot character). The administrator can choose to allow only image, video, and audio files (i.e., not PDF) if desired.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An unrestricted file upload vulnerability in the Add New Assets function of Strapi 4.1.12 allows attackers to conduct XSS attacks via a crafted PDF file. NOTE: the project documentation suggests that a user with the Media Library \"Create (upload)\" permission is supposed to be able to upload PDF files containing JavaScript, and that all files in a public assets folder are accessible to the outside world (unless the filename begins with a dot character). The administrator can choose to allow only image, video, and audio files (i.e., not PDF) if desired.","source":"cvelist"},{"lang":"en","text":"An unrestricted file upload vulnerability in the Add New Assets function of Strapi v4.1.12 allows attackers to execute arbitrary code via a crafted file. After an authenticated attacker uploads a file containing a malicious URL, a victim copies and pastes the malicious URL into a new tab to receive the XSS payload.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Una vulnerabilidad de carga de archivos sin restricciones en la función Add New Assets de Strapi versión v4.1.12, permite a atacantes ejecutar código arbitrario por medio de un archivo diseñado","source":"nvd"}],"published":"2022-07-13T00:00:00.000Z","modified":"2026-07-02T16:00:48.177Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N","score":4.6,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-434"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"4.1.12"}],"ecosystem":"npm","package":"@strapi/strapi","purl":"pkg:npm/%40strapi/strapi","source":"ghsa"},{"ranges":[{"status":"affected","version":"4.1.12"}],"vendor":"strapi","product":"strapi","cpe":"cpe:2.3:a:strapi:strapi:4.1.12:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/bypazs/strapi","tags":["product","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://grimthereaperteam.medium.com/strapi-v4-1-12-unrestricted-file-upload-b993bfd07e4e","tags":["exploit","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://docs.strapi.io/dev-docs/configurations/public-assets","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://docs.strapi.io/user-docs/users-roles-permissions/configuring-administrator-roles","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/strapi/strapi/blob/d9277d616b4478a3839e79e47330a4aaf167a2f1/packages/core/upload/admin/src/components/MediaLibraryInput/index.js#L33","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/strapi/strapi/blob/d9277d616b4478a3839e79e47330a4aaf167a2f1/packages/core/content-type-builder/admin/src/components/AllowedTypesSelect/index.js#L14","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-32114","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/strapi/strapi","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-32114","url":"https://www.cve.org/CVERecord?id=CVE-2022-32114","licence":"CVE Terms of Use","modified":"2025-02-13T16:32:42.016Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4vm8-j95f-j6v5","url":"https://github.com/advisories/GHSA-4vm8-j95f-j6v5","licence":"CC-BY-4.0","modified":"2024-03-21T17:36:58.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-32114","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-32114","licence":"Public domain","modified":"2026-07-02T16:00:48.177Z"}],"updatedAt":"2026-11-25T22:58:12.934Z","epss":{"score":0.02029,"percentile":0.81603,"date":"2026-12-01T12:00:22.000Z"}}