mediumCVSS 6.5Vulnerability

GHSA-jvcm-f35g-w78p

### Summary `AgentRuntime` promises scoped file access under a configured sandbox `basePath`, but its path containment checks use raw string prefix tests. A sandbox base such as `/tmp/network-ai-sandbox` also matches a sibling path such as `/tmp/network-ai-sandbox_evil/secret.txt`. An agent/user that can call `AgentRuntime.readFile()` or `AgentRuntime.listDir()` can read or list files outside the intended sandbox when the target path is in a sibling directory sharing the base path prefix. This breaks the documented sandbox boundary. Confirmed in Network-AI 5.12.1. Severity: Medium, CVSS 3.1 vector `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`. ### Details The vulnerable containment check is in `lib/agent-runtime.ts`: ```ts resolvePath(filePath: string): string | null { const normalized = normalize(filePath); const absolute = isAbsolute(normalized) ? normalized : join(this.config.basePath, normalized); const resolved = resolve(absolute); // Traversal check if (!resolved.startsWith(this.config.basePath)) return null; return resolved; } ``` `startsWith()` is not path-boundary-aware. If `this.config.basePath` is `/tmp/network-ai-sandbox`, then `/tmp/network-ai-sandbox_evil/secret.txt` also starts with `/tmp/network-ai-sandbox` despite being outside the sandbox. The same pattern appears in `SandboxPolicy.isPathAllowed()` for allowed and blocked paths. `FileAccessor.read()`, `FileAccessor.write()`, and `FileAccessor.list()` rely on these checks before I/O, and `AgentRuntime.readFile()` exposes this behavior. Reads auto-approve by default when `autoApproveReads` is enabled. Affected source evidence: - `lib/agent-runtime.ts:393-423` — `isPathAllowed()` / `resolvePath()` use string `startsWith()` containment. - `lib/agent-runtime.ts:669-691` — file read sink relies on those checks. - `lib/agent-runtime.ts:933-958` — `AgentRuntime.readFile()` exposes file reads. ### PoC Run from the repository root after installing dependencies: ```bash node -r

Properties

ghsa_id
GHSA-jvcm-f35g-w78p
severity
medium
summary
Network-AI: AgentRuntime sandbox path-prefix checks allow file access outside the configured base directory
cvss_score
6.5
cve_id
GHSA-jvcm-f35g-w78p
cvss_vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
is_ghsa_only
true
ghsa_published
2026-06-19T21:42:29Z
source_url
https://github.com/advisories/GHSA-jvcm-f35g-w78p
ghsa_updated
2026-06-19T21:42:30Z

Related Entities (5)

AFFECTS (1)

[Software]npm/network-ai

HAS_WEAKNESS (2)

[Weakness]Relative Path Traversal
[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]npm/network-ai

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-jvcm-f35g-w78p (CVSS 6.5) — Ninja Signal Threat Intelligence | Ninja Signal