billchurch / webssh2

Web SSH Client using ssh2, socket.io, xterm.js, and express. webssh webssh2
MIT License
2.32k stars 530 forks source link

Cross Site Script (XSS) attack on at least the `header` url param #345

Open elongstreet88 opened 11 months ago

elongstreet88 commented 11 months ago

You can execute a xss using at least the header url param (didnt check others, but assume the same for anything page rendering).

Ex: http://localhost:2222/ssh/host/mydevice.local?header=<img src=x onerror=alert('XSS')>

Output:

image

The params would need to be sanitized properly to avoid rendering on the page.