Skip to content

Commit f35ec7c

Browse files
1 parent 7f0f73e commit f35ec7c

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-hhjv-jq77-cmvx",
4+
"modified": "2026-03-05T00:35:29Z",
5+
"published": "2026-03-05T00:35:29Z",
6+
"aliases": [],
7+
"summary": "zeptoclaw has Android device shell blocklist bypass via argument permutation",
8+
"details": "### Summary\n[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.\n\n### Details\nAs 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.\n```rust\npub async fn device_shell(adb: &AdbExecutor, cmd: &str) -> Result<String> {\n // Normalize whitespace for blocklist check\n let normalized: String = cmd.split_whitespace().collect::<Vec<_>>().join(\" \");\n let lower = normalized.to_lowercase();\n\n let blocked = [\n \"rm -rf\",\n \"rm -r\",\n \"reboot\",\n \"factory_reset\",\n \"wipe\",\n \"format\",\n \"dd if=\",\n \"mkfs\",\n \"flash\",\n \"fastboot\",\n ];\n for pattern in &blocked {\n if lower.contains(pattern) {\n return Err(ZeptoError::Tool(format!(\n \"Blocked dangerous command containing '{}'\",\n pattern\n )));\n }\n }\n```\n\n### PoC\nSet up [zeptoclaw](https://github.com/qhkm/zeptoclaw) with an Android tool and then run the command `rm -f -r` etc.\n\n### Impact\nUnauthorized command executed in Android device.\n\n### Credit\n[@zpbrent](https://github.com/zpbrent)",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "crates.io",
19+
"name": "zeptoclaw"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "0.6.2"
30+
}
31+
]
32+
}
33+
],
34+
"database_specific": {
35+
"last_known_affected_version_range": "<= 0.6.1"
36+
}
37+
}
38+
],
39+
"references": [
40+
{
41+
"type": "WEB",
42+
"url": "https://github.com/qhkm/zeptoclaw/security/advisories/GHSA-hhjv-jq77-cmvx"
43+
},
44+
{
45+
"type": "WEB",
46+
"url": "https://github.com/qhkm/zeptoclaw/commit/68916c3e4f3af107f11940b27854fc7ef517058b"
47+
},
48+
{
49+
"type": "PACKAGE",
50+
"url": "https://github.com/qhkm/zeptoclaw"
51+
},
52+
{
53+
"type": "WEB",
54+
"url": "https://github.com/qhkm/zeptoclaw/blob/fe2ef07cfec5bb46b42cdd65f52b9230c03e9270/src/tools/android/actions.rs#L413-L424"
55+
}
56+
],
57+
"database_specific": {
58+
"cwe_ids": [
59+
"CWE-78"
60+
],
61+
"severity": "HIGH",
62+
"github_reviewed": true,
63+
"github_reviewed_at": "2026-03-05T00:35:29Z",
64+
"nvd_published_at": null
65+
}
66+
}

0 commit comments

Comments
 (0)