By default, any application that writes untrusted data to the terminal without filtering for ANSI escape sequences is vulnerable to remote code execution when running under ConEmu. This is done by using the fact that ConEmu has a special OSC for executing programs ESC ] 9; 7; prog ST.
To mitigate this you can disable Injecting ConEmuHk and ensure your process isn't directly run by ConEmu. However this may not be desirable as you lose other functionality.
A possible change to deal with this could be to add an option that by default disables ConEmu OSC handling.
Even though ConEmu isn't really to blame, applications should be filtering untrusted data, in practice the default behavior is unsafe.
The text was updated successfully, but these errors were encountered:
…lowed code and macro.
This allows [ConEmu specific OSC](https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC)
to be executed: `^]]9;6;""*macro*""^]\\` and `^]]9;7;""*cmd*""^]\\`.
Since now, they allowed by default in `cmd.exe` only (were implemented for `GitShowBranch.cmd`).
User may also disable or enable they for any process.
Also, there is a list of allowed commands. Commands are case-sensitive, one line - one command.
User may use `*` to allow bunch of commands by ‘mask’.