# GHSA-xrmc-c5cg-rv7x: SafeInstall agent guard shell parsing can miss raw package execution

> Attackers can bypass SafeInstall guard checks via crafted shell commands, allowing malicious package execution with developer permissions.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 10 Jul 2026

## What is GHSA-xrmc-c5cg-rv7x?

GHSA-xrmc-c5cg-rv7x is a vulnerability in safeinstall-cli, published on 10 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

## Summary

SafeInstall CLI through 0.10.1 can fail to recognize some package-manager and registry-runner commands in its agent guard. Case-variant launcher names, leading file-descriptor redirections, and supported shell wrappers with options can cause a raw install command to receive no guard decision. Remote project scaffolding through package-manager create/init commands can also avoid the approval decision used for other registry runners.

## Impact

When the SafeInstall guard is installed for a coding agent, a crafted shell command can bypass the intended deny or ask response. The coding agent may then run a package installation or registry-provided scaffolding command without SafeInstall policy evaluation and without SafeInstall enforcing disabled lifecycle scripts.

Exploitation requires a coding agent to act on attacker-influenced instructions and issue the crafted shell command. A successful malicious package or runner can execute with the permissions of the developer account, affecting the confidentiality, integrity, and availability of local source code, credentials, and development resources.

The vulnerability is limited to guard interception. Commands already routed through the SafeInstall CLI continue to receive normal policy evaluation.

## Affected versions

- safeinstall-cli <= 0.10.1

## Patched version

- safeinstall-cli 0.10.2

## Fix

Version 0.10.2:

- normalizes package-manager and wrapper launcher names for detection and rewriting;
- parses leading redirections before classifying the command;
- handles supported wrapper option arity conservatively and fails closed on ambiguous embedded command syntax;
- routes remote create/init scaffolding through the registry-runner approval path;
- preserves SafeInstall routing for path-qualified package-manager invocations.

The patch includes a permanent regression corpus, table-driven parser characterization, an independent reference detector, and deterministic fuzz invariants. The integrated release candidate passed 626 tests, package smoke validation, and a one-million-command fuzz campaign with zero invariant violations.

## Mitigation

Upgrade to safeinstall-cli 0.10.2 or later.

Until an upgrade is possible, manually review every coding-agent shell command and prevent the agent from invoking package managers or registry runners directly. Running an affected guard does not make raw package-manager execution safe.

## Credits

Discovered, reproduced, and remediated by the SafeInstall maintainer during adversarial parser testing.

## Which versions are affected by GHSA-xrmc-c5cg-rv7x?

2 open source packages ship an affected version, including safeinstall-cli.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `safeinstall-cli` | npm | All versions | 0.10.2 |
| `safeinstall-cli` | npm | All versions | 0.10.2 |

## How do I fix GHSA-xrmc-c5cg-rv7x?

Upgrade safeinstall-cli to 0.10.2 or later.

## Is GHSA-xrmc-c5cg-rv7x being exploited?

There is no known exploitation of GHSA-xrmc-c5cg-rv7x in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-xrmc-c5cg-rv7x and fix it if it is affected.

What it is: GHSA-xrmc-c5cg-rv7x is a vulnerability in safeinstall-cli, published on 10 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-xrmc-c5cg-rv7x in the wild and no public exploit code.

Affected packages and fixed versions:
- safeinstall-cli (npm): affected all versions; fixed in 0.10.2
- safeinstall-cli (npm): affected all versions; fixed in 0.10.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-xrmc-c5cg-rv7x/ (Markdown: https://insights.sbomify.com/GHSA-xrmc-c5cg-rv7x/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-xrmc-c5cg-rv7x

---
From sbomify Insights: https://insights.sbomify.com/GHSA-xrmc-c5cg-rv7x/
Summaries are generated and may contain mistakes; the official description above is the record.
