CVE-2021-32561 OctoPrint API Error Messages vulnerable to XSS
Attackers can execute arbitrary scripts in the OctoPrint web interface via reflected XSS in API error messages.
- 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-2021-32561?
CVE-2021-32561 is a medium-severity cross-site scripting vulnerability in n/a, published on 11 May 2021. 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
OctoPrint before 1.6.0 allows XSS because API error messages include the values of input parameters.
Weakness: CWE-79
Which versions are affected by CVE-2021-32561?
3 open source packages ship an affected version, including octoprint and OctoPrint. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
octoprint PyPI | All versions | 1.6.0 |
octoprint PyPI | All versions | 1.6.0 |
OctoPrint PyPI | All versions | 1.6.0 |
Products include Octoprint Octoprint.
How do I fix CVE-2021-32561?
Upgrade octoprint to 1.6.0 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-2021-32561 being exploited?
There is no known exploitation of CVE-2021-32561 in the wild and no public exploit code.
Other vulnerabilities in n/a
- CVE-2018-16710 Information disclosure in n/a
- CVE-2025-58180 OctoPrint is Vulnerable to RCE Attacks via Unsanitized Filename in File Upload
- CVE-2022-1430 Cross-site Scripting (XSS) - DOM in octoprint/octoprint
- CVE-2022-1432 Cross-site Scripting (XSS) - Generic in octoprint/octoprint
- CVE-2024-32977 OctoPrint Authentication Bypass via X-Forwarded-For Header when autologinLocal is enabled
Sources
Also known as GHSA-vcx4-fpmp-mvv6, PYSEC-2021-30.