# CVE-2026-16120: nextlevelbuilder GoClaw command execution bypass via basename collision

Source: https://junglewise.ai/threats/cve-2026-16120-nextlevelbuilder-goclaw-command-execution-bypass-via-basename  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-18. Updated: 2026-07-18  
License: CC BY 4.0 with a link back

CVE-2026-16120 · Severity: medium · CVSS 6.3 · Published 2026-07-18

GoClaw, a tool for deploying AI agent teams, contains a security flaw in how it validates commands before running them on a host server. When configured to only allow specific approved commands (an 'allowlist'), the system incorrectly checks only the name of the command rather than its full path. This allows an authorized user to trick the system into running a malicious file they have uploaded by giving it the same name as a trusted command, potentially leading to full control over the host server.

Technologies: [Nextlevelbuilder GoClaw](https://junglewise.ai/threats/technologies/goclaw). Vendors: [Nextlevelbuilder](https://junglewise.ai/threats/vendors/nextlevelbuilder).

## Quick answers

**Is CVE-2026-16120 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-16120 being exploited in the wild.

**How severe is CVE-2026-16120?** Medium severity, with a CVSS score of 6.3, published 18 July 2026.

**Which products and versions are affected?** Nextlevelbuilder GoClaw <= 3.13.3-beta.3.

**Is there a fix for CVE-2026-16120?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-16120 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-16120?** Check whether you run Nextlevelbuilder GoClaw at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A vulnerability exists in GoClaw's `internal/tools/exec_approval.go` within the `matchesAllowlist` and `extractBin` functions. When `tools.execApproval.security` is set to `allowlist`, the system uses `filepath.Base()` to extract the command name for validation. This creates an identity split where the approval layer validates a basename (e.g., 'echo'), but the execution layer runs the original user-supplied string (e.g., './echo') via `/bin/sh -c`. An authenticated operator can exploit this by placing a malicious binary with a trusted name in their workspace and invoking it via the `POST /v1/tools/invoke` endpoint. This results in arbitrary command execution with the privileges of the GoClaw host process.

## Affected products

- nextlevelbuilder GoClaw <= 3.13.3-beta.3

## Timeline

- 2026-07-18: disclosed: Public disclosure of the vulnerability and exploit details.
- 2026-07-18: advisory

## References

- [https://github.com/nextlevelbuilder/goclaw/](https://github.com/nextlevelbuilder/goclaw/)
- [https://github.com/nextlevelbuilder/goclaw/issues/1213](https://github.com/nextlevelbuilder/goclaw/issues/1213)
- [https://github.com/nextlevelbuilder/goclaw/issues/1213](https://github.com/nextlevelbuilder/goclaw/issues/1213)
- [https://vuldb.com/cve/CVE-2026-16120](https://vuldb.com/cve/CVE-2026-16120)
- [https://vuldb.com/submit/856826](https://vuldb.com/submit/856826)
- [https://vuldb.com/vuln/379829](https://vuldb.com/vuln/379829)
- [https://vuldb.com/vuln/379829/cti](https://vuldb.com/vuln/379829/cti)

## Related threats

- [nextlevelbuilder GoClaw Information Disclosure in jq Handler](https://junglewise.ai/threats/cve-2026-18038-nextlevelbuilder-goclaw-information-disclosure-in-jq-handler)
- [nextlevelbuilder GoClaw authorization bypass in ExecTool.Execute](https://junglewise.ai/threats/cve-2026-16199-nextlevelbuilder-goclaw-authorization-bypass-in-exectool-execute)
- [nextlevelbuilder GoClaw SSRF in web_fetch component](https://junglewise.ai/threats/cve-2026-16124-nextlevelbuilder-goclaw-ssrf-in-web-fetch-component)
- [nextlevelbuilder GoClaw authorization bypass in ToolsInvokeHandler](https://junglewise.ai/threats/cve-2026-16123-nextlevelbuilder-goclaw-authorization-bypass-in)
- [nextlevelbuilder GoClaw authorization bypass in exec approval flow](https://junglewise.ai/threats/cve-2026-16122-nextlevelbuilder-goclaw-authorization-bypass-in-exec-approval)
