T09 · Insecure Skill Coding Practices
- Location
scripts/xiaoya_download.py:88- Finding
Terminal Escape-Sequence Injection Through Untrusted Search Results
- Content
View full analysis
2d} │ {name_pad:<35s} │ {tags:<20s} │ {sz:<5s} │") ``` ### Technical Analysis Search-result names are extracted from the HTML response returned by the user-configured `XIAOYA_HOST`. These values are treated as trusted display text and printed without removing ANSI escape sequences, C0/C1 control characters, or other terminal control codes. A malicious or compromised Xiaoya/Alist server can place terminal escape sequences inside an anchor's displayed name. When the user invokes the `search` command, `print()` emits those bytes to the active terminal. Depending on terminal capabilities and configuration, escape sequences can alter displayed output, conceal warnings, create deceptive hyperlinks, change terminal state, or manipulate clipboard contents through mechanisms such as OSC 52. The code does not invoke a shell with this data, so the finding does not by itself provide direct operating-system command execution. Exploitation depends on control over, or compromise of, the configured search server or its returned content. ### Attack Path 1. The victim configures `XIA ...[truncated 1450 chars]- Remediation
View remediation
