CVE-2022-32114: XSS

Published Jul 13, 2022
·
Updated

DISPUTED 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.

Other sources

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.

GitHub

Affected Software

3 affected components
npm/@strapi/strapi<=4.1.12
Strapi Strapi=4.1.12
Strapi Strapi=4.1.12

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Restrict Strapi Media Library "Add New Assets" uploads to image/video/audio only by disallowing PDF files (to prevent XSS via crafted PDF uploads described for v4.1.12).

    Strapi 4.1.12 (Add New Assets / Media upload) Allowed file types (disable PDF uploads) = Disable PDF
  2. Compensating control

    If public exposure of uploaded files is configured (public assets folder), prevent external access to uploaded files or ensure only non-executable, permitted content is served publicly, since the issue notes that files in a public assets folder are accessible to the outside world.

Event History

Jul 13, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Disputed
09:15 PM
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeaknessAffected Software
Jul 14, 2022
Advisory Published
via GitHub·12:00 AM

Frequently Asked Questions

1

What is CVE-2022-32114?

CVE-2022-32114 is an unrestricted file upload vulnerability in the Add New Assets function of Strapi 4.1.12 that allows attackers to conduct XSS attacks via a crafted PDF file.

2

What is the severity of CVE-2022-32114?

The severity of CVE-2022-32114 is rated as high with a CVSS score of 8.8.

3

How does CVE-2022-32114 affect Strapi?

CVE-2022-32114 affects Strapi version 4.1.12.

4

How can an attacker exploit CVE-2022-32114?

An attacker can exploit CVE-2022-32114 by uploading a crafted PDF file through the Add New Assets function and conduct XSS attacks.

5

Are there any fixes or patches available for CVE-2022-32114?

Strapi has not released any specific fixes or patches for CVE-2022-32114. It is recommended to follow secure coding practices and ensure user input is properly validated and sanitized.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203