{"id":"CVE-2026-58413","revision":"42e46a64720b4d94a50cd8ffa05fe231","records":[{"revision":"42e46a64720b4d94a50cd8ffa05fe231","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-58413","aliases":[],"title":"EnvironmentManager.restore() backup ID path traversal copies arbitrary directories into environment data","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.","state":0,"publishedAt":"2026-07-20T16:26:07.531+00:00","modifiedAt":"2026-07-20T17:20:47.976+00:00","affected":[{"ecosystem":"Vendor product","name":"Network-AI","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Jovancoding\",\n                    \"product\": \"Network-AI\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 5.12.2\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N","score":6.1,"severity":"MEDIUM"}],"references":["https://github.com/Jovancoding/Network-AI/security/advisories/GHSA-48x2-6pr9-2jjf","https://github.com/Jovancoding/Network-AI/commit/a59c13a1f0ce0e8a0779a90343eef92fac5ab4c3","https://github.com/Jovancoding/Network-AI/releases/tag/v5.12.2"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-58413","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-58413","identifiers":["CVE-2026-58413"]},"retained":false,"historicalAffected":[]}],"coverage":[]}