Skip to content
MediumVulnerability

GHSA-6x2m-p4xp-wg22: Network-AI: EnvironmentManager.backup() follows symlinked directories and copies files outside the environment root into backups

Published
Record updated
View JSON
Affected
  • network-ai <= 5.12.1
Fixed in
5.12.2
  • released June 18, 2026, 1 day before disclosure

Summary

Network-AI's EnvironmentManager.backup() recursively collects files with _collectBackupFiles(), which calls statSync() and therefore follows symlinks. A symlink under data/<env> pointing to a directory outside the environment root causes backup() to copy external files into data/<env>/.backups/<backupId>/, confirmed in version 5.12.1. The source reports no RCE chain.

Mitigation

Fixed in v5.12.2 (commit a59c13a): _collectBackupFiles() now uses lstatSync instead of statSync and skips any entry where isSymbolicLink() is true, so symlinks are never traversed. Install with npm install network-ai@5.12.2.