{"id":"CVE-2025-58180","published":"2025-09-09T19:34:14Z","modified":"2025-09-10T13:59:11Z","title":"OctoPrint is Vulnerable to RCE Attacks via Unsanitized Filename in File Upload","vendor":"OctoPrint","product":"OctoPrint","tier":"tail","description":{"text":"OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.11.2 contain a vulnerability that allows an authenticated attacker to upload a file under a specially crafted filename that will allow arbitrary command execution if said filename becomes included in a command defined in a system event handler and said event gets triggered. If no event handlers executing system commands with uploaded filenames as parameters have been configured, this vulnerability does not have an impact. The vulnerability is patched in version 1.11.3. As a workaround, OctoPrint administrators who have event handlers configured that include any kind of filename based placeholders should disable those by setting their `enabled` property to `False` or unchecking the \"Enabled\" checkbox in the GUI based Event Manager. Alternatively, OctoPrint administrators should set `feature.enforceReallyUniversalFilenames` to `true` in `config.yaml` and restart OctoPrint, then vet the existing uploads and make sure to delete any suspicious looking files. As always, OctoPrint administrators are advised to not expose OctoPrint on hostile networks like the public internet, and to vet who has access to their instance.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:A/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.04998,"percentile":0.92999,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/OctoPrint/OctoPrint/security/advisories/GHSA-49mj-x8jp-qvfc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OctoPrint/OctoPrint/commit/be4201ef58d9a7c03593252398c16eada90a258b","tags":["x_refsource_MISC"]},{"url":"https://github.com/OctoPrint/OctoPrint/commit/c3a940962f4658a8e035a00388781b1cbd768841","tags":["x_refsource_MISC"]},{"url":"https://github.com/OctoPrint/OctoPrint/releases/tag/1.11.3","tags":["x_refsource_MISC"]}],"priority":{"score":28.8,"factors":[{"name":"EPSS percentile","points":18.6},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"exploitdb":{"count":1,"earliest":"2026-02-04"},"pocGithub":{"count":1,"skipped":0,"earliest":"2025-09-09","earliestUrl":"https://github.com/prabhatverma47/CVE-2025-58180","repos":[{"name":"prabhatverma47/CVE-2025-58180","url":"https://github.com/prabhatverma47/CVE-2025-58180","stars":0,"created":"2025-09-09"}]},"first":{"date":"2025-09-09","source":"PoC-in-GitHub","url":"https://github.com/prabhatverma47/CVE-2025-58180"},"provenance":"source"},"vendorSlug":"octoprint","affectedVersions":[{"vendor":"OctoPrint","product":"OctoPrint","versions":["< 1.11.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-09-10T13:59:03.369589Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"octoprint","vulnerableRanges":["<1.11.3"],"patched":["1.11.3"],"from":["GHSA-49mj-x8jp-qvfc","PYSEC-2026-1712"],"provenance":"source"}],"summary":{"text":"OctoPrint, the web interface for controlling consumer 3D printers, has a flaw in its file upload handling where filenames are not properly sanitized before use in system event handler commands. An authenticated attacker on the network can upload a file with a specially crafted name that leads to arbitrary command execution, but only if an event handler that runs system commands with filename placeholders is configured and the triggering event occurs.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T04:02:24Z"},"euvd":{"id":"EUVD-2025-27483","exploited":false,"provenance":"source"},"exploits":[{"id":52476,"url":"https://www.exploit-db.com/exploits/52476","title":"OctoPrint 1.11.2 - File Upload","date":"2026-02-04","verified":false,"provenance":"source"}],"lineage":{"familyId":"fam-octoprint-cve-2022-1432","children":[{"from":"CVE-2025-58180","to":"CVE-2013-10077","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/octoprint/events.py"],"commits":["https://github.com/OctoPrint/OctoPrint/commit/eccc9d6fbde0c46cdd6e255fd5ce9a30077ba954","https://github.com/OctoPrint/OctoPrint/commit/be4201ef58d9a7c03593252398c16eada90a258b","https://github.com/OctoPrint/OctoPrint/commit/c3a940962f4658a8e035a00388781b1cbd768841"],"basis":"shared function","functions":["_processCommand","eventCallback"]}]}],"packageHistory":[{"cve":"CVE-2025-58180","published":"2025-09-09","fixed":"1.11.3","kev":false},{"cve":"CVE-2025-64187","published":"2025-11-07","fixed":"1.11.4","kev":false,"link":{"from":"CVE-2025-58180","to":"CVE-2025-64187","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:octoprint","fromFixed":"1.11.3","toFixed":"1.11.4","daysApart":59}]}}],"package":"PyPI:octoprint"}}