Summary
A path traversal flaw in the SoftVC VITS full-song inference server lets remote attackers supply arbitrary filesystem paths via the audio_path field on the /wav2wav route.
When triggered, the server reads and returns file contents in the HTTP response and can also write attacker-controlled .wav files to arbitrary locations on the host.
Affected context
This vulnerability appears in deployments of the SoftVC VITS Singing Voice Conversion system that expose the full-song inference HTTP server, specifically the /wav2wav endpoint.
It is most relevant when:
- The service is reachable over a network (internal or external)
- The audio_path parameter is accepted directly from client input
- The underlying process has filesystem access to sensitive directories
In such setups, untrusted clients can influence which files are read and where new audio files are written.
Exploit preconditions
- Attack surface: HTTP interface of the SoftVC VITS full-song inference server, particularly the unauthenticated /wav2wav route.
- Required access: Network connectivity to the server; no authentication is required to send POST requests.
- Trigger point: Submission of a crafted POST request where the audio_path field contains an attacker-chosen filesystem path (e.g., absolute or traversal-based).
- Why exploitation is possible: User-supplied paths are passed verbatim into libraries such as librosa.load, torchaudio.load, and soundfile.write without normalization, restriction to expected directories, or validation against a safe allowlist, allowing direct interaction with arbitrary paths on the host filesystem.
Why this happens
The root cause is insufficient validation and constraint of user-controlled file paths before they are used in file I/O operations.
The application treats the audio_path field as trusted input and forwards it directly into path-sensitive functions that open or write files (librosa.load, torchaudio.load, soundfile.write).
This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the software fails to restrict path usage to a designated, safe directory and does not normalize or reject paths that escape that boundary.
Potential impact
- Attackers may read arbitrary files that the server process can access, including configuration files and credentials.
- Sensitive data (API keys, access tokens, internal service endpoints) could be exfiltrated via the HTTP response body.
- Attackers can cause the server to write .wav files to arbitrary filesystem locations, potentially overwriting existing data.
- Logs, models, or application resources may be tampered with, affecting integrity and reliability of the service.
- File writes in privileged contexts could facilitate further compromise or make other vulnerabilities easier to exploit.
General mitigation guidance
Effective mitigation focuses on restricting how file paths are derived from client input and controlling where file operations occur.
Common defensive patterns include:
- Confining all file reads and writes to a dedicated, non-sensitive working directory and rejecting any paths that attempt to leave it.
- Normalizing and validating paths against an allowlist of permitted directories or filenames instead of accepting arbitrary input.
- Decoupling client identifiers from filesystem paths by using server-generated IDs or handles instead of raw user-supplied paths.
- Running the inference server with least-privilege filesystem permissions so that even if paths are misused, access to sensitive areas is minimized.
- Designing APIs to accept uploaded content directly (e.g., file uploads or references to pre-registered assets) rather than arbitrary server-side file paths.
How teams detect issues like this
Detection efforts can combine code-level analysis with runtime monitoring:
- Static analysis rules that flag direct use of user-controlled variables in file I/O APIs (open, load, write) without prior validation or path restriction.
- Code review checklists that emphasize path normalization, directory confinement (chroot-like patterns or base directory joins), and avoidance of raw client paths.
- Configuration-level policies requiring that services interacting with the filesystem operate under restricted service accounts and limited directory access.
- Application logging focused on unexpected path usage, such as absolute paths, traversal sequences (../), or writes to non-standard directories, which can then be fed into SIEM or anomaly detection tools.
- Automated security testing tools or fuzzers targeting file-related endpoints to observe whether arbitrary paths are accepted and processed.

