{"id":"PYSEC-2026-1712","summary":"OctoPrint is Vulnerable to RCE Attacks via Unsanitized Filename in File Upload","details":"### Impact\n\nOctoPrint 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.\n\nIf no event handlers executing system commands with uploaded filenames as parameters have been configured, this vulnerability does not have an impact.\n\n### Patches\n\nThe vulnerability will be patched in version 1.11.3.\n\n### Workaround\n\nUntil the patch has been applied, OctoPrint administrators who have event handlers configured that include any kind of filename based placeholders (i.e. `{__filename}`, `{__filepath}`, `{filename}`, `{path}`, etc -- refer to [the events documentation](https://docs.octoprint.org/en/master/events/index.html#placeholders) for a full list) should disable those by setting their `enabled` property to `False` or unchecking the \"Enabled\" checkbox in the GUI based Event Manager.\n\nAlternatively, 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 (e.g. those that contain a `;` in their name followed by a command).\n\nAs 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.\n\n### Credits\n\nThis vulnerability was discovered and responsibly disclosed to OctoPrint by @prabhatverma47.","aliases":["CVE-2025-58180","GHSA-49mj-x8jp-qvfc"],"modified":"2026-07-07T17:46:29.843888901Z","published":"2026-07-07T16:03:04.277623Z","references":[{"type":"WEB","url":"https://github.com/OctoPrint/OctoPrint/security/advisories/GHSA-49mj-x8jp-qvfc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-58180"},{"type":"WEB","url":"https://github.com/OctoPrint/OctoPrint/commit/be4201ef58d9a7c03593252398c16eada90a258b"},{"type":"WEB","url":"https://github.com/OctoPrint/OctoPrint/commit/c3a940962f4658a8e035a00388781b1cbd768841"},{"type":"PACKAGE","url":"https://github.com/OctoPrint/OctoPrint"},{"type":"WEB","url":"https://github.com/OctoPrint/OctoPrint/releases/tag/1.11.3"},{"type":"PACKAGE","url":"https://pypi.org/project/octoprint"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-49mj-x8jp-qvfc"}],"affected":[{"package":{"name":"octoprint","ecosystem":"PyPI","purl":"pkg:pypi/octoprint"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.11.3"}]}],"versions":["1.10.0","1.10.0rc1","1.10.0rc2","1.10.0rc3","1.10.0rc4","1.10.1","1.10.2","1.10.3","1.11.0","1.11.0rc1","1.11.0rc2","1.11.0rc3","1.11.0rc4","1.11.0rc5","1.11.0rc6","1.11.0rc7","1.11.1","1.11.2","1.3.11","1.3.12","1.3.12rc1","1.3.12rc3","1.4.0","1.4.0rc1","1.4.0rc2","1.4.0rc3","1.4.0rc4","1.4.0rc5","1.4.0rc6","1.4.1","1.4.1rc1","1.4.1rc2","1.4.1rc3","1.4.1rc4","1.4.2","1.5.0","1.5.0rc1","1.5.0rc2","1.5.0rc3","1.5.1","1.5.2","1.5.3","1.6.0","1.6.0rc1","1.6.0rc2","1.6.0rc3","1.6.1","1.7.0","1.7.0rc1","1.7.0rc2","1.7.0rc3","1.7.1","1.7.2","1.7.3","1.8.0","1.8.0rc1","1.8.0rc2","1.8.0rc3","1.8.0rc4","1.8.0rc5","1.8.1","1.8.2","1.8.3","1.8.4","1.8.5","1.8.6","1.8.7","1.9.0","1.9.0rc1","1.9.0rc2","1.9.0rc3","1.9.0rc4","1.9.0rc5","1.9.0rc6","1.9.1","1.9.2","1.9.3"],"database_specific":{"source":"https://github.com/pypa/advisory-database/blob/main/vulns/octoprint/PYSEC-2026-1712.yaml"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V4","score":"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"}]}