CVE-2026-58413: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Jovancoding Network-AI
Network-AI is a TypeScript/Node.js multi-agent orchestrator. Prior to version 5.12.2, `EnvironmentManager.restore(env, backupId)` computes the backup path with `join(envDir, '.backups', backupId)` and only checks that this path exists. It does not resolve the result or verify that it remains under `data/<env>/.backups`. A caller can pass a traversal backup ID such as `../../../outside/source-dir` to restore files from an arbitrary directory into the target environment data directory. The issue is fixed in v5.12.2. `restore()` now validates `backupId` against `/^[\w\-]+$/` and asserts `dirname(resolve(join(backupsDir, backupId))) === resolve(backupsDir)` before touching the filesystem. Backup IDs containing path separators or `..` are rejected, so a crafted ID can no longer copy directories from outside `.backups/` into the environment.
AI Analysis
Technical Summary
Network-AI versions before 5.12.2 contain a path traversal vulnerability in the EnvironmentManager.restore(env, backupId) method. The method constructs a backup path by joining envDir, '.backups', and backupId, but only checks for path existence without resolving or verifying that the path remains within the intended backups directory. An attacker can supply a backupId with traversal sequences (e.g., '../../../outside/source-dir') to restore files from arbitrary locations into the environment data directory. The vulnerability is addressed in version 5.12.2 by enforcing a regex validation on backupId and asserting that the resolved backup path's directory matches the backups directory, preventing traversal outside the allowed directory.
Potential Impact
An attacker with limited privileges can exploit this vulnerability to restore files from arbitrary directories into the target environment's data directory. This can lead to unauthorized disclosure of sensitive files (confidentiality impact is high) and partial integrity impact due to unauthorized file restoration. Availability is not affected. The CVSS 3.1 score is 6.1 (medium severity) reflecting local attack vector with low complexity and no user interaction required.
Mitigation Recommendations
A fix is available in Network-AI version 5.12.2. Users should upgrade to version 5.12.2 or later to ensure that backup IDs are properly validated and path traversal is prevented. Until upgraded, avoid using untrusted input for backupId parameters. No vendor advisory content is provided to indicate alternative mitigations or temporary fixes.
CVE-2026-58413: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Jovancoding Network-AI
Description
Network-AI is a TypeScript/Node.js multi-agent orchestrator. Prior to version 5.12.2, `EnvironmentManager.restore(env, backupId)` computes the backup path with `join(envDir, '.backups', backupId)` and only checks that this path exists. It does not resolve the result or verify that it remains under `data/<env>/.backups`. A caller can pass a traversal backup ID such as `../../../outside/source-dir` to restore files from an arbitrary directory into the target environment data directory. The issue is fixed in v5.12.2. `restore()` now validates `backupId` against `/^[\w\-]+$/` and asserts `dirname(resolve(join(backupsDir, backupId))) === resolve(backupsDir)` before touching the filesystem. Backup IDs containing path separators or `..` are rejected, so a crafted ID can no longer copy directories from outside `.backups/` into the environment.
CVSS v3.1
Score 6.1medium
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Network-AI versions before 5.12.2 contain a path traversal vulnerability in the EnvironmentManager.restore(env, backupId) method. The method constructs a backup path by joining envDir, '.backups', and backupId, but only checks for path existence without resolving or verifying that the path remains within the intended backups directory. An attacker can supply a backupId with traversal sequences (e.g., '../../../outside/source-dir') to restore files from arbitrary locations into the environment data directory. The vulnerability is addressed in version 5.12.2 by enforcing a regex validation on backupId and asserting that the resolved backup path's directory matches the backups directory, preventing traversal outside the allowed directory.
Potential Impact
An attacker with limited privileges can exploit this vulnerability to restore files from arbitrary directories into the target environment's data directory. This can lead to unauthorized disclosure of sensitive files (confidentiality impact is high) and partial integrity impact due to unauthorized file restoration. Availability is not affected. The CVSS 3.1 score is 6.1 (medium severity) reflecting local attack vector with low complexity and no user interaction required.
Mitigation Recommendations
A fix is available in Network-AI version 5.12.2. Users should upgrade to version 5.12.2 or later to ensure that backup IDs are properly validated and path traversal is prevented. Until upgraded, avoid using untrusted input for backupId parameters. No vendor advisory content is provided to indicate alternative mitigations or temporary fixes.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-30T18:19:58.380Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a5e50312a4a8d59895ee3cc
Added to database: 07/20/2026, 16:43:29 UTC
Last enriched: 07/20/2026, 16:58:15 UTC
Last updated: 07/21/2026, 03:50:07 UTC
Views: 14
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.