Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

microsoft/terminal
main @ d0263b8
30
Fixes
7
CVEs
HIGH
Peak severity
26.7%
Coverage
Highlights
Auth Bypass: 4 prior fixes. Scrutinize any change in this area.
src/cascadia/TerminalControl/TermControl.cpp: most-fixed (2 issues). Treat as high-risk during review.
6 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: Insecure single-instance mutant and window class name registration allowed elevation of privilege bounds. The fix used a hash of the user's security identifier (SID) to ensure isolation between elevated and non-elevated terminal processes running in the same user session.
Command Injection: Unqualified or unquoted binary paths (cmd.exe, powershell.exe) in default profiles and generators allowed binary hijacking via untrusted search paths. Hardcoded absolute system paths and proper command-line argument escaping are required to mitigate execution hijacking.
Terminal Escape Sequence Injection: Failure to sanitize C0/C1 control characters from output and console titles streamed over ConPTY allowed escape sequence injections. This is closely related to historic remote code execution patterns (such as CVE-2022-44702).