CVE-2020-4041 The filename of uploaded files vulnerable to stored XSS in Bolt CMS
Stored XSS in Bolt CMS allows attackers to inject JavaScript via renamed uploaded files, potentially leading to code execution or account takeover.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2020-4041?
CVE-2020-4041 is a high-severity cross-site scripting vulnerability in bolt, published on 8 Jun 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
In Bolt CMS before version 3.7.1, the filename of uploaded files was vulnerable to stored XSS. It is not possible to inject javascript code in the file name when creating/uploading the file. But, once created/uploaded, it can be renamed to inject the payload in it. Additionally, the measures to prevent renaming the file to disallowed filename extensions could be circumvented. This is fixed in Bolt 3.7.1.
Weakness: CWE-79
Which versions are affected by CVE-2020-4041?
2 open source packages ship an affected version, including bolt/bolt. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
bolt/bolt Packagist | All versions | 3.7.1 |
bolt/bolt Packagist | All versions | 3.7.1 |
Products include Boltcms Bolt.
How do I fix CVE-2020-4041?
Upgrade bolt/bolt to 3.7.1 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2020-4041 being exploited?
There is no known exploitation of CVE-2020-4041 in the wild and no public exploit code.
Other vulnerabilities in bolt
- CVE-2022-31321 Path traversal in n/a
- CVE-2019-10874 Bolt Cross Site Request Forgery (CSRF)
- CVE-2019-9185 Bolt Unrestricted Upload of File with Dangerous Type
- CVE-2020-4040 CSRF issue on preview pages in Bolt CMS
- CVE-2025-34086 Bolt CMS Authenticated Remote Code Execution via Profile Injection and File Rename
Sources
Also known as AZL-110321, GHSA-68q3-7wjp-7q3j.