by jolmg · 6y ago · 0 comments
Urxvt is one such terminal with that vulnerability, but it can be fixed with a small perl extension, like the one I provided here:
https://security.stackexchange.com/questions/39118/how-can-i...
That answer also includes a table checking other terminals for that vulnerability.
The second example on the following page can be used to test a terminal for that variation of the attack:
Also, javascript isn't heeded for this vulnerability. https://thejh.net/misc/website-terminal-copy-paste is a link that demonstrates this with plain html, and has been discussed on HN before.
I can paste newlines just fine in both alacritty and konsole, so I'm not sure what you mean. With support for Bracketed Paste Mode, all that needs to be stripped from the pasted content is the end-paste escape sequence.
Perhaps they stripped newlines before adding Bracketed Paste Mode. That must've been quite some time ago, though.
That's strange. I tried copy-pasting the text on https://thejh.net/misc/website-terminal-copy-paste to Alacritty, and the newlines were replaced with semicolons. However, pasting newlines worked within vim in insert mode. It happens with or without bracketed paste mode on (using the "enable-bracketed-paste" option in ~/.inputrc). Same thing with Konsole.
> > A few terminals, despite having Bracketed Paste Mode, are vulnerable to escape injection. That's when the end-paste escape sequence is included in the paste content, and the terminal lets it pass through, causing the shell to think the paste ended.
I'm glad you mentioned this!
> With support for Bracketed Paste Mode, all that needs to be stripped from the pasted content is the end-paste escape sequence.
Alacritty strips the control sequence that ends bracketed paste; https://github.com/alacritty/alacritty/issues/800.