# GHSA-hhjv-jq77-cmvx: zeptoclaw has Android device shell blocklist bypass via argument permutation

> Attackers can bypass command blocklists in zeptoclaw by permuting arguments, allowing unauthorized execution of dangerous shell commands on connected Android devices.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Mar 2026

## What is GHSA-hhjv-jq77-cmvx?

GHSA-hhjv-jq77-cmvx is a vulnerability in zeptoclaw, published on 5 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

### Summary
[zeptoclaw](https://github.com/qhkm/zeptoclaw) implements a [blocklist](https://github.com/qhkm/zeptoclaw/blob/fe2ef07cfec5bb46b42cdd65f52b9230c03e9270/src/tools/android/actions.rs#L413-L424) to prevent dangerous commands running in android device shell, but this blocklist has several blocked commands with argements in the pattern literal, such as `rm -f` and `rm -rf`, this can be simply bypassed by using different orders for these arguments, such as `rm -r -f` or `rm -fr` etc.

### Details
As in code [src/tools/android/actions.rs#L413-L424](https://github.com/qhkm/zeptoclaw/blob/fe2ef07cfec5bb46b42cdd65f52b9230c03e9270/src/tools/android/actions.rs#L413-L424), we can see the `rm -f` and `rm -rf` are hard coded and thus can be simply bypassed via `rm -r -f` or `rm -fr` etc.
```rust
pub async fn device_shell(adb: &AdbExecutor, cmd: &str) -> Result<String> {
    // Normalize whitespace for blocklist check
    let normalized: String = cmd.split_whitespace().collect::<Vec<_>>().join(" ");
    let lower = normalized.to_lowercase();

    let blocked = [
        "rm -rf",
        "rm -r",
        "reboot",
        "factory_reset",
        "wipe",
        "format",
        "dd if=",
        "mkfs",
        "flash",
        "fastboot",
    ];
    for pattern in &blocked {
        if lower.contains(pattern) {
            return Err(ZeptoError::Tool(format!(
                "Blocked dangerous command containing '{}'",
                pattern
            )));
        }
    }
```

### PoC
Set up [zeptoclaw](https://github.com/qhkm/zeptoclaw) with an Android tool and then run the command `rm -f -r` etc.

### Impact
Unauthorized command executed in Android device.

### Credit
[@zpbrent](https://github.com/zpbrent)

## Which versions are affected by GHSA-hhjv-jq77-cmvx?

2 open source packages ship an affected version, including zeptoclaw.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `zeptoclaw` | crates.io | All versions | 0.6.2 |
| `zeptoclaw` | crates.io | All versions | 0.6.2 |

## How do I fix GHSA-hhjv-jq77-cmvx?

Upgrade zeptoclaw to 0.6.2 or later.

## Is GHSA-hhjv-jq77-cmvx being exploited?

There is no known exploitation of GHSA-hhjv-jq77-cmvx in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-hhjv-jq77-cmvx and fix it if it is affected.

What it is: GHSA-hhjv-jq77-cmvx is a vulnerability in zeptoclaw, published on 5 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-hhjv-jq77-cmvx in the wild and no public exploit code.

Affected packages and fixed versions:
- zeptoclaw (crates.io): affected all versions; fixed in 0.6.2
- zeptoclaw (crates.io): affected all versions; fixed in 0.6.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-hhjv-jq77-cmvx/ (Markdown: https://insights.sbomify.com/GHSA-hhjv-jq77-cmvx/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-hhjv-jq77-cmvx

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