CVE-2022-2872: OctoPrint vulnerable to Unrestricted Upload of File with Dangerous Type
3.7
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.28394%
CWE
Published
9/22/2022
Updated
10/7/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| OctoPrint | pip | < 1.8.3 | 1.8.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from missing file type validation in copy/move operations. The patch added octoprint.filemanager.valid_file_type checks to these functions. Pre-patch versions allowed renaming uploaded .gcode files to dangerous types (like .html) via these functions. The commit diff explicitly shows these validations were added to copy_file and move_file in storage.py, confirming they were the vulnerable entry points.