CVE-2021-32561 OctoPrint API Error Messages vulnerable to XSS

Medium 6.1 Published Updated

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.

PackageAffectedFixed in
octoprint PyPIAll versions1.6.0
octoprint PyPIAll versions1.6.0
OctoPrint PyPIAll versions1.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.

Sources

Also known as GHSA-vcx4-fpmp-mvv6, PYSEC-2021-30.

Is CVE-2021-32561 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free