Skip to content
File upload Disclosed report Intermediate CVE-2022-2872

OctoPrint vulnerable to Unrestricted Upload of File with Dangerous Type

OctoPrint before 1.8.3 allowed an attacker to change the extension of an uploaded file disguised as a .gcode file due to a misconfiguration in the move file functionality. This could let an attacker upload a file with a dangerous type, potentially leading to code execution or other harm.

octoprint/octoprint

Originally disclosed on huntr

OctoPrint prior to version 1.8.3 is vulnerable to Unrestricted Upload of File with Dangerous Type. Due to misconfiguration in move file functionality, an attacker could easily change the file extension of an uploaded malicious file disguised as a .gcode file. Version 1.8.3 contains a patch.

From the GitHub Advisory Database (GHSA-49wm-4fp6-h59c, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could upload a file with a dangerous extension, potentially leading to code execution or other harm, though the text does not specify the exact impact.

What the attacker needed

Ability to upload a .gcode file; access to move file functionality

The fix

The vulnerability was fixed in version 1.8.3.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

OctoPrint is a web tool for controlling 3D printers. It lets users upload files, and it checks the file type by looking at the extension (like .gcode). A flaw in the 'move file' feature meant someone could rename an uploaded file to a dangerous extension, so the server might treat it as something executable rather than harmless printer instructions.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More from octoprint/octoprint

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.