# GHSA-Q9J4-4H4J-MV5M: OAuth error\_description is printed to the terminal without sanitizing ANSI/control characters

- Database: GitHub
- Severity: CVSS 3.1 (Low)
- Published: 2026-09-13
- Modified: 2026-09-13

## Affected versions

- @argos-ci/cli (npm): through 6.9.3

## Description

### Summary
`argos login` prints a failed OAuth callback's `error_description` query parameter to the terminal verbatim. A hostile authorization server (reachable because the authorize URL host is taken from the `ARGOS_APP_BASE_URL` env var) can embed ANSI escape sequences and carriage returns that clear or overwrite terminal lines, letting a phishing flow display forged trusted-looking CLI output (e.g. a fake "run this command to continue" instruction).

### Details
- `packages/cli/src/commands/login.ts:74-76` reads `error` / `error_description` from the loopback callback URL via `url.searchParams.get` — decoded, never validated.
- `login.ts:80-81` wraps it raw into an `Error`;
- `login.ts:177-184` interpolates it into an error string printed via `console.error`. The `color()` helper (`login.ts:30-35`) only wraps the message in `\x1b[31m...\x1b[0m` and strips nothing.

Example payload: `error_description=%1B%5B2K%0D%5BFAKE%5D%20Security%20alert%3A%20run%20evil.sh` produces terminal output where `\x1b[2K\r` erases the current line and the attacker text renders as if it came from the CLI itself.

### PoC
1. Start `argos login` (the loopback listener is on 127.0.0.1 with an ephemeral port).
2. Request: `GET http://127.0.0.1:<port>/callback?error=access_denied&error_description=%1B%5B2K%0D%5BFAKE%5D%20Security%20alert`
3. The raw text, including the escape sequence and carriage return, is printed to the user's terminal.

### Impact
a social-engineering primitive against developers running `argos login`, with no code execution impact of its own. The response HTML served to the browser is static, so there is no XSS angle; impact is terminal spoofing only.

## References

- https://github.com/argos-ci/argos-javascript/security/advisories/GHSA-q9j4-4h4j-mv5m

Page: https://cve.now/GHSA-Q9J4-4H4J-MV5M

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
