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.
References
- github.com/OctoPrint/OctoPrint/blob/2.0.2/src/…serial_comm.py#L3129-L3136
- github.com/OctoPrint/OctoPrint/blob/2.0.2/src/…app/helpers.js#L841-L846
- github.com/OctoPrint/OctoPrint/blob/2.0.2/src/…odels/files.js#L990-L995
- github.com/OctoPrint/OctoPrint/issues/5508
- github.com/OctoPrint/OctoPrint/pull/5509
- vulncheck.com/advisories/octoprint-through-2.0…n-confirmation