CVE-2022-1430:
Cross-site Scripting in OctoPrint
7.5
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.5967%
CWE
Published
5/19/2022
Updated
10/8/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
OctoPrint | pip | < 1.8.0 | 1.8.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper handling of the 'redirect' parameter in the login endpoint. The pre-patch code in views.py's login function used request.args.get("redirect") without validating the URL structure. The commit added validation using urlparse to check for schemes/netlocs, indicating the original function lacked these protections. As the login flow would reflect this parameter in client-side redirects, this created an XSS vector through crafted redirect URLs containing JavaScript payloads.