CVE-2026-58413

EnvironmentManager.restore() backup ID path traversal copies arbitrary directories into environment data

Published Jul 20, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The flaw resides in the EnvironmentManager.restore() function, which builds a backup path by joining the environment directory with the supplied backupId but fails to resolve or constrain that path. An attacker can provide a traversal string such as ../../../outside/source-dir, causing the orchestrator to copy files from arbitrary locations on the host into the target environment’s data directory. This results in unauthorized overwriting of data that may contain credentials or configuration, jeopardizing confidentiality and integrity of the environment.

Affected Systems

Jovancoding Network-AI versions earlier than 5.12.2 are affected. The vulnerability is present in the TypeScript/Node.js multi‑agent orchestrator before the release that introduces validation of the backupId. Any deployment running these versions with untrusted users able to call restore() is vulnerable.

Risk and Exploitability

The national CVSS score of 6.1 indicates a moderate severity vulnerability. The EPSS score is < 1%, indicating a very low but nonzero likelihood of exploitation, and the issue is not listed in the CISA KEV catalog. Based on the description, the likely attack vector requires the ability to invoke restore() with a crafted backupId, which suggests the attack originates from a privileged API or local process that can interact with the orchestrator. If such access is achieved, the attacker can redirect file copying operations to arbitrary directories, potentially overwriting critical data without authentication checks.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Jovancoding Network-AI to version 5.12.2 or later to enforce backupId validation.
  • Restrict access to the restore() API or command so that only trusted users can invoke it.
  • Verify that all backupIds conform to the /^[\w\-]+$/ pattern and that no path traversal occurs.

Generated by OpenCVE AI on July 30, 2026 at 19:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Network-ai
Network-ai network-ai
CPEs cpe:2.3:a:network-ai:network-ai:*:*:*:*:*:*:*:*
Vendors & Products Network-ai
Network-ai network-ai
Type Values Removed Values Added
First Time appeared Jovancoding
Jovancoding network-ai
Vendors & Products Jovancoding
Jovancoding network-ai
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title EnvironmentManager.restore() backup ID path traversal copies arbitrary directories into environment data
Weaknesses CWE-22
CWE-23
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-23

    Relative Path Traversal

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 20, 2026, 5:20 PM
Reserved
Jun 30, 2026, 6:19 PM
Status
Analyzed
Published
Jul 20, 2026, 5:18 PM
Modified
Oct 24, 2026, 8:10 PM