{"id":"CVE-2024-28237","aliases":["CVE-2024-28237","GHSA-x7mf-wrh9-r76c","PYSEC-2024-179"],"related":[],"kind":"vulnerability","state":"published","title":"OctoPrint XSS via the \"Snapshot Test\" feature in Classic Webcam plugin settings","summary":"OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.9.3 contain a vulnerability that allows malicious admins to configure or talk a victim with administrator rights into configuring a webcam snapshot URL which when tested through the \"Test\" button included in the web interface will execute JavaScript code in the victims browser when attempting to render the snapshot image. An attacker who successfully talked a victim with admin rights into performing a snapshot test with such a crafted URL could use this to retrieve or modify sensitive configuration settings, interrupt prints or otherwise interact with the OctoPrint instance in a malicious way. The vulnerability is patched in version 1.10.0rc3. OctoPrint administrators are strongly advised to thoroughly vet who has admin access to their installation and what settings they modify based on instructions by strangers.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.9.3 contain a vulnerability that allows malicious admins to configure or talk a victim with administrator rights into configuring a webcam snapshot URL which when tested through the \"Test\" button included in the web interface will execute JavaScript code in the victims browser when attempting to render the snapshot image. An attacker who successfully talked a victim with admin rights into performing a snapshot test with such a crafted URL could use this to retrieve or modify sensitive configuration settings, interrupt prints or otherwise interact with the OctoPrint instance in a malicious way. The vulnerability is patched in version 1.10.0rc3. OctoPrint administrators are strongly advised to thoroughly vet who has admin access to their installation and what settings they modify based on instructions by strangers.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nOctoPrint versions up until and including 1.9.3 contain a vulnerability that allows malicious admins to configure or talk a victim with administrator rights into configuring a webcam snapshot URL which when tested through the \"Test\" button included in the web interface will execute JavaScript code in the victims browser when attempting to render the snapshot image.\n\nAn attacker who successfully talked a victim with admin rights into performing a snapshot test with such a crafted URL could use this to retrieve or modify sensitive configuration settings, interrupt prints or otherwise interact with the OctoPrint instance in a malicious way.\n\n### Patches\n\nThe vulnerability will be patched in version 1.10.0.\n\n### Workaround\n\nOctoPrint administrators are strongly advised to thoroughly vet who has admin access to their installation and what settings they modify based on instructions by strangers.\n\n### PoC\n\nBelow are the steps to reproduce the vulnerability:\n\n1. Create a URL that responds with a malicious content type. For example, creating the following python script:\n   ```\n   from http.server import BaseHTTPRequestHandler, HTTPServer\n\n   class MyHTTPRequestHandler(BaseHTTPRequestHandler):\n       def do_GET(self):\n           self.send_response(200)\n           self.send_header('Content-Type', 'image/\"onerror=\"alert(1)\"')\n           self.end_headers()\n           self.wfile.write(b'Ok')\n\n   def run():\n       server_address = ('', 8080)\n       httpd = HTTPServer(server_address, MyHTTPRequestHandler)\n       print('Server listening on 0.0.0.0:8080...')\n       httpd.serve_forever()\n\n   if __name__ == '__main__':\n       run()\n   ```\n\n2. Go to OctoPrint settings --> Plugins --> Classic Webcam and enter the URL of that page as the Snapshot URL. \n\n3. Click on the \"Test\" button to trigger XSS. A Javascript alert should appear, demonstrating the actual code injection.\n\n### Credits\n\nThis vulnerability was discovered and responsibly disclosed to OctoPrint by Jacopo Tediosi.","format":"markdown","source":"ghsa"},{"lang":"es","text":"OctoPrint proporciona una interfaz web para controlar impresoras 3D de consumo. Las versiones de OctoPrint hasta la 1.9.3 incluida contienen una vulnerabilidad que permite a administradores maliciosos configurar o convencer a una víctima con derechos de administrador para que configure una URL de instantánea de cámara web que, cuando se prueba a través del botón \"Probar\" incluido en la interfaz web, ejecutará código JavaScript en el navegador de la víctima al intentar renderizar la imagen instantánea. Un atacante que consiguiera convencer a una víctima con derechos de administrador para que realizara una prueba instantánea con una URL tan manipulada podría utilizarla para recuperar o modificar ajustes de configuración confidenciales, interrumpir impresiones o interactuar de otro modo con la instancia de OctoPrint de forma maliciosa. La vulnerabilidad está parcheada en la versión 1.10.0rc3. Se recomienda encarecidamente a los administradores de OctoPrint que investiguen minuciosamente quién tiene acceso de administrador a su instalación y qué configuraciones modifican según instrucciones de extraños.","source":"nvd"}],"published":"2024-03-18T20:29:45.000Z","modified":"2026-06-17T07:21:14.340Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L","score":4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L","score":4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L","score":4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N","score":4.8,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"<= 1.9.3","status":"affected"}],"vendor":"OctoPrint","product":"OctoPrint","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","lastAffected":"1.9.3","status":"affected"}],"vendor":"octoprint","product":"octoprint","cpe":"cpe:2.3:a:octoprint:octoprint:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.10.0rc3"}],"ecosystem":"PyPI","package":"octoprint","purl":"pkg:pypi/octoprint","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.10.0"},{"status":"affected","version":"1.10.0"},{"status":"affected","version":"1.10.0"}],"vendor":"octoprint","product":"octoprint","cpe":"cpe:2.3:a:octoprint:octoprint:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"779894c1bc6478332d14bc9ed1006df1354eb517"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.10.0"}],"ecosystem":"PyPI","package":"octoprint","purl":"pkg:pypi/octoprint","repo":"https://github.com/octoprint/octoprint","source":"pysec"}],"references":[{"url":"https://github.com/OctoPrint/OctoPrint/security/advisories/GHSA-x7mf-wrh9-r76c","tags":["advisory","evidence","exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/OctoPrint/OctoPrint/commit/779894c1bc6478332d14bc9ed1006df1354eb517","tags":["fix","patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28237","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/OctoPrint/OctoPrint","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/octoprint/PYSEC-2024-179.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-x7mf-wrh9-r76c","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-08-02T15:19:13.496Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-28237","url":"https://www.cve.org/CVERecord?id=CVE-2024-28237","licence":"CVE Terms of Use","modified":"2024-08-02T15:20:14.054Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x7mf-wrh9-r76c","url":"https://github.com/advisories/GHSA-x7mf-wrh9-r76c","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:18.725Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-28237","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28237","licence":"Public domain","modified":"2026-06-17T07:21:14.340Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-179","url":"https://osv.dev/vulnerability/PYSEC-2024-179","licence":"CC-BY-4.0","modified":"2026-06-10T17:14:16.017Z"}],"updatedAt":"2026-11-25T22:58:37.688Z","epss":{"score":0.00435,"percentile":0.39534,"date":"2026-12-02T12:00:21.000Z"}}