network-ai

GHSA-2FMP-9RVW-HC96

GHSA-2FMP-9RVW-HC96 is a high-severity path traversal vulnerability in network-ai (npm), affecting versions <= 5.12.1. It is fixed in 5.12.2.

Key facts
CVSS score
7.1
High
Attack vector
Local
Issuing authority
GitHub Advisory Database
Affected package
network-ai
Fixed in
5.12.2
Disclosed
Not available

Summary

Summary EnvironmentManager.listBackups() reads each backup's manifest.json and trusts the manifest's path field. EnvironmentManager.pruneBackups() later passes that trusted entry.path directly to rmSync(entry.path, { recursive: true, force: true }). An attacker who can place or modify a manifest inside data/<env>/.backups/<name>/manifest.json can cause network-ai env backup prune --env <env> --keep <n> or any code path invoking pruneBackups() to recursively delete an arbitrary path accessible to the Network-AI process user. Confirmed in Network-AI 5.12.1. Details listBackups() trusts manifest content from disk: pruneBackups() uses the attacker-controlled entry.path as the deletion target: Default CLI reachability exists through network-ai env backup prune --env <env> --keep <n>. Affected source evidence: lib/env-manager.ts:505-523, reads trusted backup entries from _manifest.json. lib/env-manager.ts:529-541, recursively deletes entry.path. bin/cli.ts:464-472, default CLI exposes backup pruning. PoC This PoC uses only a temporary directory and deletes only a temporary file: Observed result: before is true, deleted is 1, and after is false, proving deletion occurred outside data/dev/.backups. Impact An attacker with write access to the Network-AI data directory can cause recursive deletion of arbitrary filesystem paths accessible to the Network-AI process user when backup pruning runs. This can delete project files, data directories, or other process-writable paths, causing data loss and denial of service. No RCE chain was confirmed. Resolution (maintainer) Fixed in v5.12.2 (commit a59c13a). Install: npm install [email protected], published to npm with provenance. pruneBackups() no longer passes entry.path from the on-disk manifest to rmSync. The deletion path is recomputed from a format-validated entry.backupId, and a dirname containment check confines deletion to exactly one level under the backups directory. A poisoned manifest (e.g. "path": "/") is now inert. All 3,269 tests pass against the patched build. Thanks to @sondt99 for the responsible disclosure.

Impact

What is path traversal?

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

Severity and exposure

GHSA-2FMP-9RVW-HC96 has a CVSS score of 7.1 (High). The vector is requires local access, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (5.12.2). Upgrading removes the vulnerable code path.

Affected versions

npm

  • network-ai (<= 5.12.1)

Security releases

  • network-ai → 5.12.2 (npm)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether GHSA-2FMP-9RVW-HC96 is reachable in your applications. Explore open-source security for your team.

See if GHSA-2FMP-9RVW-HC96 is reachable in your applications. Get a demo

Already deployed Kodem? See GHSA-2FMP-9RVW-HC96 in your environment

Remediation advice

Upgrade network-ai to 5.12.2 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about GHSA-2FMP-9RVW-HC96

What is GHSA-2FMP-9RVW-HC96?

GHSA-2FMP-9RVW-HC96 is a high-severity path traversal vulnerability in network-ai (npm), affecting versions <= 5.12.1. It is fixed in 5.12.2. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.

How severe is GHSA-2FMP-9RVW-HC96?

GHSA-2FMP-9RVW-HC96 has a CVSS score of 7.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of network-ai are affected by GHSA-2FMP-9RVW-HC96?

network-ai (npm) versions <= 5.12.1 is affected.

Is there a fix for GHSA-2FMP-9RVW-HC96?

Yes. GHSA-2FMP-9RVW-HC96 is fixed in 5.12.2. Upgrade to this version or later.

Is GHSA-2FMP-9RVW-HC96 exploitable, and should I be worried?

Whether GHSA-2FMP-9RVW-HC96 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether GHSA-2FMP-9RVW-HC96 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix GHSA-2FMP-9RVW-HC96?

Upgrade network-ai to 5.12.2 or later.

Stop the waste.
Protect your environment with Kodem.