# CVE-2026-58413: EnvironmentManager.restore() backup ID path traversal copies arbitrary directories into environment data

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-19T21:42:38.000Z
- Modified: 2026-10-24T20:10:00.137Z
- Also known as: GHSA-48x2-6pr9-2jjf
- Weaknesses: CWE-22, CWE-23
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Jovancoding Network-AI: < 5.12.2
- network-ai (npm): before 5.12.2
- network-ai network-ai: before 5.12.2

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N`

## References

- <https://github.com/Jovancoding/Network-AI/security/advisories/GHSA-48x2-6pr9-2jjf> (exploit, patch, vendor-advisory, web)
- <https://github.com/Jovancoding/Network-AI/commit/a59c13a1f0ce0e8a0779a90343eef92fac5ab4c3> (patch, web)
- <https://github.com/Jovancoding/Network-AI/releases/tag/v5.12.2> (patch, release-notes, web)
- <https://github.com/Jovancoding/Network-AI> (package)

## Sources

- CVE List: [CVE-2026-58413](https://www.cve.org/CVERecord?id=CVE-2026-58413), CVE Terms of Use, modified 2026-07-20
- GitHub Advisory Database: [GHSA-48x2-6pr9-2jjf](https://github.com/advisories/GHSA-48x2-6pr9-2jjf), CC-BY-4.0, modified 2026-07-21
- NVD: [CVE-2026-58413](https://nvd.nist.gov/vuln/detail/CVE-2026-58413), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-58413 · Whole record: https://cve.day/CVE-2026-58413.json · Rebuilt by cve.day 2026-11-25T22:59:29.256Z
