GHSA-6X2M-P4XP-WG22 is a medium-severity path traversal vulnerability in network-ai (npm), affecting versions <= 5.12.1. It is fixed in 5.12.2.
Summary EnvironmentManager.backup() recursively collects files using collectBackupFiles(). collectBackupFiles() uses statSync(full), which follows symlinks. If data/<env> contains a symlink to a directory outside the environment root, backup recursion follows the symlink and copies external files into data/<env>/.backups/<backupId>/. An attacker who can place a symlink under the environment data directory can cause backup operations to disclose files outside the environment root into backup artifacts. Confirmed in Network-AI 5.12.1. Details backup() collects file paths and copies them into the backup directory: collectBackupFiles() follows symlinked directories because it calls statSync(), not lstatSync(): Default CLI reachability exists through network-ai env backup create --env <env>. backup() also runs automatically before promotion and restore operations. Affected source evidence: lib/env-manager.ts:435-460, backup copy logic. lib/env-manager.ts:596-617, symlink-following collectBackupFiles(). bin/cli.ts:413-420, default CLI exposes backup creation. lib/env-manager.ts:294-297 and 483-484, backup also runs before promote/restore. PoC This PoC uses only temporary files. It creates a symlink inside data/dev pointing to an external directory, then runs backup('dev') and observes that the external file is copied into the backup: Observed result: copied is true and content is secret-through-symlink. Impact An attacker who can place a symlink in data/<env> can cause backup creation to copy arbitrary readable files from outside the environment root into data/<env>/.backups/<backupId>/. This can disclose secrets or local files to any actor/process that can later read or export Network-AI backup artifacts. No RCE chain was confirmed. Resolution (maintainer) Fixed in v5.12.2 (commit a59c13a). Install: npm install [email protected], published to npm with provenance. _collectBackupFiles() now uses lstatSync instead of statSync and skips any entry where isSymbolicLink() is true. Symlinks are never traversed, so backup() can no longer follow a link out of the environment root and copy external files into a backup artifact. All 3,269 tests pass against the patched build. Thanks to @sondt99 for the responsible disclosure.
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.
GHSA-6X2M-P4XP-WG22 has a CVSS score of 5.5 (Medium). 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.
npm
network-ai (<= 5.12.1)network-ai → 5.12.2 (npm)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-6X2M-P4XP-WG22 is reachable in your applications. Explore open-source security for your team.
See if GHSA-6X2M-P4XP-WG22 is reachable in your applications. Get a demo
Already deployed Kodem? See GHSA-6X2M-P4XP-WG22 in your environment →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.
GHSA-6X2M-P4XP-WG22 is a medium-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.
GHSA-6X2M-P4XP-WG22 has a CVSS score of 5.5 (Medium). 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.
network-ai (npm) versions <= 5.12.1 is affected.
Yes. GHSA-6X2M-P4XP-WG22 is fixed in 5.12.2. Upgrade to this version or later.
Whether GHSA-6X2M-P4XP-WG22 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
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.
Upgrade network-ai to 5.12.2 or later.