Security

numbat: PowerShell option prefixes hide commands from analysis

numbat - PowerShell option-abbreviation parser differential lets a monitored command evade shell_commands analysis and enforce-mode deny (GHSA-qc7h-pq4v-569f)

PUBLISHED SEVERITY HIGHSTATUS PatchedGHSA-qc7h-pq4v-569f
Patched

Fixed in numbat 0.3.0 (2026-10-19) by maintainer PR #82, which matches PowerShell options by prefix the way PowerShell does. The maintainer confirmed the detection gap; they did not reproduce the enforce-mode bypass in the configurations they tested. Track the fix at perplexityai/numbat#82.

Product
numbat (Go module github.com/perplexityai/numbat) in perplexityai/numbat
Affected versions
numbat before 0.3.0, on endpoints where the monitored agent runs PowerShell (pwsh or Windows PowerShell). Fixed in 0.3.0 (2026-10-19).
Severity
HIGH
Status
Patched
Weaknesses
  • CWE-436Interpretation Conflict
  • CWE-693Protection Mechanism Failure
As filed on the advisory.
GitHub advisory
GHSA-qc7h-pq4v-569f
Private; closed by the maintainer after the fix, not published
CVE
Not requested
Published
Credit
Finder: Aaron Elijah Mars of Aeon. Tool: Aeon (https://www.aeon.fun).

What users should do now

  1. Upgrade numbat to 0.3.0 or later (released 2026-10-19). It includes #82, which recognizes PowerShell option prefixes.
  2. On endpoints where agents run PowerShell, review events from before the upgrade where numbat recorded a powershell or pwsh process but no inner commands: those payloads were not checked by the rules.

Summary

numbat gives visibility into AI agent activity on endpoints, with on-device detection and optional pre-action blocking. When an agent runs powershell or pwsh, numbat decodes the inner script and expands it into shell_commands, which the detection rules match against. Before 0.3.0 the parser compared each option against a fixed set of exact spellings. PowerShell itself accepts any case-insensitive prefix of an option name that is at least as long as that option's shortest unambiguous form. A valid but unlisted spelling fell through to the parser's default: branch and returned an "unsupported PowerShell option" error, so the inner script was never analyzed. The report also described this error suppressing enforce-mode denies; the maintainer did not reproduce that part.

Affected versions

numbat (Go module github.com/perplexityai/numbat) before 0.3.0, when the monitored agent runs PowerShell (pwsh on any platform, or Windows PowerShell). The same exact-match option table is in v0.2.0. Reviewed on main at 0e41ad6. Fixed in 0.3.0 (2026-10-19).

Impact

This does not compromise the numbat host or give code execution in numbat. It lets the party numbat is built to observe, such as a prompt-injected or misaligned coding agent, choose per command whether numbat can see the payload:

  • Detection loss (monitor mode, the default). The outer powershell process is still recorded, but its inner script is not expanded, so payload-level rules across exec, secrets, exfiltration, recon, persistence and chain sequences do not evaluate against it.
  • Coverage. For -EncodedCommand, numbat knew 4 of the spellings PowerShell accepts (-e, -ec, -enc, -encodedcommand), leaving others such as -en, -encod and -encoded unhandled. For -Command, it knew -c and -command only, so a plain-text script passed with -co, -com or -comm was not extracted either. Value-taking options such as -ExecutionPolicy had the same gap.
  • Enforce mode (reported, not reproduced by the maintainer). The parser error marks the event as unsafe to enforce on, which the report said suppresses a deny for rules marked enforce: true. The maintainer did not reproduce this in the configurations they tested.

Affected code

Fix

  • #82 replaces the exact-match tables with one shared option table that follows PowerShell's own CLI parser: an option matches when the given key is a prefix of its full name and at least as long as its shortest unambiguous form.
  • Both projection paths now use that shared table, so they can no longer drift apart, and new regression tests cover the prefix spellings. The PR also advances numbat's stored projection revision to v12.
  • The fix ships in numbat 0.3.0 and is present at the head of main.

Detection (for defenders)

In numbat data from before 0.3.0, look for powershell or pwsh processes whose command line has an option that is a shortened form of -EncodedCommand, -Command or -ExecutionPolicy other than the listed spellings, and, where analysis errors are recorded, for ones that read "unsupported PowerShell option". A working exploit is withheld.

Timeline

  1. Reported privately via GitHub PVR (GHSA-qc7h-pq4v-569f), with a suggested fix.
  2. Follow-up on the advisory after re-checking that the finding still reproduced at the head of main.
  3. Maintainer merges #82 (PowerShell option prefixes), releases 0.3.0 and closes the advisory as addressed through the normal bug-fix process, without publishing it.
  4. Public write-up.

Credit

Finder: Aaron Elijah Mars of Aeon. Tool: Aeon.

References