What happened
InputSanitizer.sanitizePath() guards against traversal with an unanchored startsWith comparison, which a sibling directory name that shares a prefix with the base can defeat, allowing paths to escape the intended base directory.
Why it matters
An agent-framework path sanitizer is a central control that many other file operations depend on; when it can be bypassed by sibling-directory paths, downstream reads/writes in the agent runtime lose their confinement, compounding the broader trust-boundary failure in this package.
Attack vector
The sanitizer accepts a path whose directory name shares a string prefix with and sits as a sibling of the intended base directory, so an attacker-controlled path escapes the base directory even though the string check passes. This compounds the other traversal/primitives in the package.
Affected systems
network-ai npm package, InputSanitizer.sanitizePath(), versions before 5.15.5; fixed in 5.15.5
Mitigation
Upgrade to network-ai >= 5.15.5; replace the unanchored startsWith check with resolved-path containment against the canonical base directory (and separator-awareness).