Summary
WWBN AVideo's AI plugin has a path traversal flaw in its asynchronous response handler, where an unsanitized language parameter can affect where subtitle files are written. A person with a valid AI token may be able to write attacker-controlled .vtt files to unintended locations, including the webroot or another user's subtitle path.
Affected context
The issue occurs in plugin/AI/receiveAsync.json.php when the handler processes translation requests and uses the response[lang] value to determine a subtitle file path. It is relevant when a request reaches this handler with a valid AI token and the language value is not safely constrained before the file is written.
Exploit preconditions
- Attack surface: The AI plugin's asynchronous response endpoint
- Required access: A valid AI token
- Trigger point: Handling a
type=translationrequest - Why exploitation is possible: The language parameter is used in a file path without adequate traversal protection, potentially allowing writes outside the intended subtitle directory
Why this happens
The handler uses a request-controlled path component without ensuring that it remains within the intended destination directory. This is a path traversal weakness, mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. File extensions or expected naming conventions alone do not ensure that a resolved path stays inside an approved location.
Potential impact
- An attacker may write arbitrary
.vttcontent to unintended locations. - Attacker-controlled subtitle files could be placed in the webroot.
- Existing subtitle files belonging to other users could be overwritten.
- Depending on how affected files are served and consumed, the writes could disrupt content or affect users who access it.
General mitigation guidance
Common defensive patterns for this class of issue include:
- Deriving destination paths from server-controlled identifiers rather than request-provided path components.
- Restricting language values to a strict allowlist of supported identifiers.
- Canonicalizing the resolved path and verifying it remains within the intended directory before writing.
- Using file-writing APIs and directory permissions that limit writes to the required subtitle location.
- Applying least privilege to the process handling AI responses and keeping writable areas separate from served application files.
- Treating tokens and request parameters as untrusted for path construction, even when the request is authenticated.
How teams detect issues like this
Detection approaches may include:
- Static analysis rules for request-derived values used in filesystem paths or file-writing operations.
- Code review checks for path normalization, destination-directory containment checks, and strict validation of filename components.
- Tests and security policies that verify writes cannot escape approved directories and that only supported language identifiers are accepted.
- Monitoring for unexpected
.vttfile creation or modification outside designated subtitle directories.

