Stored cross-site scripting in OctoPrint via SD file list
Key facts
- Attack vector
- Adjacent network
- Privileges required
- Low
- User interaction
- Passive
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
Summary
OctoPrint through 2.0.2 contains a stored cross-site scripting flaw (CWE-79) because it does not sanitize printer SD file names before showing them in the file list. An attacker with printer control can plant a crafted file name through M118 echo commands, so script runs when another user deletes that entry and acts with that user's API permissions.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
OctoPrint through 2.0.2 contains a stored cross-site scripting vulnerability that allows attackers to inject HTML by planting unsanitized printer SD file names. Attackers with printer control can send M118 echo commands emitting a crafted file list, executing script when another user deletes the entry and acting with their API permissions.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
The sources list no fixed version for OctoPrint.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Timeline
- 2026-11-30 Threatist record created from CVE-2026-139901
- 2026-11-30 CISA SSVC decision points changed
- 2026-11-30 Alias added: GHSA-mw4c-85wr-37rh
References
Other 4
- https://github.com/OctoPrint/OctoPrint/issues/5508
- https://github.com/OctoPrint/OctoPrint/blob/2.0.2/src/octoprint/static/js/app/viewmodels/files.js#L990-L995
- https://github.com/OctoPrint/OctoPrint/blob/2.0.2/src/octoprint/static/js/app/helpers.js#L841-L846
- https://github.com/OctoPrint/OctoPrint/blob/2.0.2/src/octoprint/plugins/serial_connector/serial_comm.py#L3129-L3136
More OctoPrint vulnerabilities
- TI-2022-02830 Improper Privilege Management in octoprint/octoprint CVSS 3.1HIGH 8.8
- TI-2022-03320 Failure to Sanitize Special Elements into a Different Plane (Special Element Injection) in octoprint/octoprint CVSS 3.1MEDIUM 6.0
- TI-2022-02664 Unrestricted Upload of File with Dangerous Type in octoprint/octoprint CVSS 3.1MEDIUM 5.4
- TI-2024-18796 OctoPrint XSS via the "Snapshot Test" feature in Classic Webcam plugin settings CVSS 3.1MEDIUM 4.8
- TI-2022-02678 Insufficient Session Expiration in octoprint/octoprint CVSS 3.1MEDIUM 4.4
- TI-2024-21843 OctoPrint Authentication Bypass via X-Forwarded-For Header when autologinLocal is enabled CVSS 3.1CRITICAL 9.4
Sources
- CVE-2026-139901 · CVE Program
- CVE-2026-139901 · NVD
- GHSA-mw4c-85wr-37rh · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences