Summary
Network-AI's AgentVCR can mishandle cassette names containing path traversal sequences, allowing access beyond the intended cassette location. If an attacker can control a name passed to load() or save(), they may read or overwrite accessible .json files, including sensitive data or policy configuration.
Network-AI's AgentVCR can mishandle cassette names containing path traversal sequences, allowing access beyond the intended cassette location. If an attacker can control a name passed to load() or save(), they may read or overwrite accessible .json files, including sensitive data or policy configuration.
Affected context
The issue affects Network-AI versions from 5.13.4 to before 5.15.5 in AgentVCR's cassette loading and saving behavior. It becomes relevant when an attacker can supply or influence a cassette name and the process has access to JSON files outside the intended cassette directory. The potential consequences depend on the files accessible to the AgentVCR process.
The issue affects Network-AI versions from 5.13.4 to before 5.15.5 in AgentVCR's cassette loading and saving behavior. It becomes relevant when an attacker can supply or influence a cassette name and the process has access to JSON files outside the intended cassette directory. The potential consequences depend on the files accessible to the AgentVCR process.
Exploit preconditions
- Attack surface: Code paths that invoke AgentVCR cassette loading or saving
- Required access: Ability to control or influence the cassette name; whether this requires authentication depends on how the application exposes those code paths
- Trigger point: A cassette name is passed to
load()orsave() - Why exploitation is possible: The name can contain traversal sequences, and path handling may allow it to resolve outside the intended directory
- Additional condition: The process must have filesystem permissions to read or modify the targeted JSON file
- Attack surface: Code paths that invoke AgentVCR cassette loading or saving
- Required access: Ability to control or influence the cassette name; whether this requires authentication depends on how the application exposes those code paths
- Trigger point: A cassette name is passed to
load()orsave() - Why exploitation is possible: The name can contain traversal sequences, and path handling may allow it to resolve outside the intended directory
- Additional condition: The process must have filesystem permissions to read or modify the targeted JSON file
Why this happens
The underlying issue is improper limitation of a user-influenced path. If cassette names are combined with filesystem paths without reliably constraining the resolved path to an approved directory, traversal sequences can escape that directory. This maps to CWE-23: Relative Path Traversal.
The underlying issue is improper limitation of a user-influenced path. If cassette names are combined with filesystem paths without reliably constraining the resolved path to an approved directory, traversal sequences can escape that directory. This maps to CWE-23: Relative Path Traversal.
Potential impact
- Sensitive JSON data may be disclosed
- Accessible JSON files may be overwritten or corrupted
- Policy settings, including AuthGuardian trust-level configuration, could be modified
- Application behavior or security decisions may be affected by tampered configuration
- Sensitive JSON data may be disclosed
- Accessible JSON files may be overwritten or corrupted
- Policy settings, including AuthGuardian trust-level configuration, could be modified
- Application behavior or security decisions may be affected by tampered configuration
General mitigation guidance
Defensive patterns focus on ensuring user-influenced names cannot select files outside an explicitly permitted location.
- Prefer mapping external cassette identifiers to internally generated filenames rather than using them directly as paths
- Canonicalize resolved paths and verify they remain within the intended base directory
- Apply strict allowlist validation to cassette names and reject path separators or traversal components
- Limit the AgentVCR process's filesystem permissions, especially for sensitive policy files
- Keep sensitive configuration separate from writable cassette storage and use read-only access where practical
Defensive patterns focus on ensuring user-influenced names cannot select files outside an explicitly permitted location.
- Prefer mapping external cassette identifiers to internally generated filenames rather than using them directly as paths
- Canonicalize resolved paths and verify they remain within the intended base directory
- Apply strict allowlist validation to cassette names and reject path separators or traversal components
- Limit the AgentVCR process's filesystem permissions, especially for sensitive policy files
- Keep sensitive configuration separate from writable cassette storage and use read-only access where practical
How teams detect issues like this
- Use static analysis to identify user-controlled values flowing into file path construction and file read/write operations
- Review path joins and normalization logic for checks that constrain the final resolved path to an approved directory
- Look for code paths where cassette names reach
load()orsave()without allowlist validation - Apply filesystem access policies that restrict the process to required cassette locations and protect policy files from writes
- Consider automated code review checks for path traversal patterns and untrusted input reaching filesystem APIs
- Use static analysis to identify user-controlled values flowing into file path construction and file read/write operations
- Review path joins and normalization logic for checks that constrain the final resolved path to an approved directory
- Look for code paths where cassette names reach
load()orsave()without allowlist validation - Apply filesystem access policies that restrict the process to required cassette locations and protect policy files from writes
- Consider automated code review checks for path traversal patterns and untrusted input reaching filesystem APIs

