T09 · Insecure Skill Coding Practices
- Location
lux_tts_tool.py:108- Finding
Caller-Controlled Voice Name Allows Path Traversal and Arbitrary File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is broadly a local TTS integration, but its install guidance and file-handling expose more local write and install authority than users are clearly warned about.
Review before installing. Run it only in a dedicated low-privilege environment, inspect any referenced deploy/download scripts before use, avoid ExecutionPolicy Bypass unless you understand the risk, pin dependencies, and do not expose the voice-import or output-path interfaces to untrusted callers. Treat the current implementation as partly simulated TTS, not guaranteed real LuxTTS synthesis.
lux_tts_tool.py:108Caller-Controlled Voice Name Allows Path Traversal and Arbitrary File Overwrite
lux_tts_ready.py:62Nonexistent Voice Path Causes Caller-Controlled File Creation
lux_tts_fixed.py:72Predictable Shared Temporary Filename Enables Collision and Symlink Attacks
INSTALL_GUIDE.md:26Installation Instructions Use Unpinned Dependencies Without Integrity Verification
The guide explicitly recommends using powershell -ExecutionPolicy Bypass -File deploy.ps1 to circumvent PowerShell's script execution protections, but does not warn that this disables a defense meant to prevent untrusted script execution. In an installation guide that already asks users to run local scripts and batch files, this increases the chance a user will execute tampered or unsafe code with reduced safeguards.
The documented fallback pattern silently sends text to a cloud TTS provider when local generation fails, but it does not warn that user content may leave the local environment. In a skill whose stated value is privacy-preserving local TTS, this creates a meaningful confidentiality risk because users may assume sensitive text is always processed locally.
The skill documents a forceful cache deletion command (Remove-Item ... -Recurse -Force) without any warning, scope limitation, or confirmation step. Even though this is documentation rather than executable code, users may copy and run it directly, causing unintended data loss if the cache path is misconfigured or expanded beyond what the user expects.
The generate() docstring says it converts input text into speech, but the body explicitly labels the work as a simulated generation process and creates a fixed-frequency sine wave based only on text length. This is an active contradiction between the documented intent and the actual behavior, not merely an omitted implementation detail.
The top-level docstring says this is a fully usable LuxTTS simulation with the same API and seamless replacement path, and the class docstring repeats that claim. However, the code returns a hardcoded 'simulated_encoding' in encode_prompt and generates sinusoidal waveform tones in generate_speech rather than performing genuine prompt encoding or speech synthesis, so the documentation overstates what the code actually does.
The file's user-facing documentation and CLI/status/test messages are written exclusively in Chinese, and the built-in test phrase is also hardcoded in Chinese. This imposes a specific language/locale experience without offering the user a choice or documenting a justified region-specific constraint.
The CLI writes decoded audio bytes to a user-specified output path without any path restrictions, confirmation, or safety checks. In an agent or automation context, this can overwrite arbitrary files accessible to the process, enabling destructive file clobbering or placement of attacker-controlled content in sensitive locations.
The top-level documentation says this file integrates LuxTTS into the tool system, which implies text-to-speech functionality. However, the implementation includes add_voice(), which copies a user-supplied file path into the configured voices directory, adding local file ingestion and filesystem modification behavior not described by the documentation.
This Python file contains user-facing descriptions, help text, status messages, and errors entirely in Chinese, starting with the module docstring and continuing throughout the CLI interface. Under the policy rule, forcing a specific language without opt-in is a natural-language locale violation because users are not offered any language choice and no region-specific justification is stated.
The documentation says this is a simple test script for LuxTTS, which implies validating the LuxTTS functionality itself. However, lines L44-L59 create a separate 440 Hz sine wave using NumPy and write it to a hard-coded filesystem location, an action not actually testing LuxTTS output and extending beyond the stated purpose of the script.
This code contains user-facing and instructional natural-language content in Chinese, such as the module docstring and comments, without any indication that the skill is intentionally locale-specific or that users can opt into another language. That can violate the language/locale policy because it implicitly forces a specific language for understanding or maintenance.
The function returns a result structure containing file_path as though it refers to generated output, yet the file is removed immediately before the return. This contradicts the apparent contract of the returned data and can mislead callers about what artifact exists after generation.
The method is documented as performing audio prompt encoding with parameters matching the real LuxTTS API. In practice, if the supplied path does not exist, it silently creates a test WAV file at that path and then returns a simulated encoding object, which contradicts the stated intent of merely encoding the caller's prompt audio.
The file contains user-facing natural-language content in Chinese in the module docstring and function docstring/comments, with no indication that another language is available. This can violate language/locale policy when a skill implicitly forces a specific language without user opt-in.
No suspicious patterns detected.