8.8high
Strapi 4.1.12 Cross-site Scripting via crafted file
- Severity
- 8.8high CVSS:3.1 by NVD
- Exploit likelihood
- 2.03% (higher than 81% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-4vm8-j95f-j6v5
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| @strapi/strapi (npm) | up to 4.1.12 | GitHub Advisory Database |
| strapi strapi | 4.1.12 | NVD |
All scores
| GitHub | 4.6medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.5medium CVSS:2.0 | AV:N/AC:L/Au:S/C:P/I:P/A:P |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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.
NVD (es)
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
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-32114 changed 2025-02-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4vm8-j95f-j6v5 changed 2024-03-21 | CC-BY-4.0 |
| NVD | CVE-2022-32114 changed 2026-07-02 | Public domain |