T07 · Tool Hijacking and Spoofing
- Location
scripts/transcribe.py:19- Finding
Python Import-Path Hijacking Through a Shared Temporary Directory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real local transcription skill, but it needs Review because installation and runtime behavior are broader and less safely scoped than the privacy/offline wording suggests.
Install only if you are comfortable with external package/model downloads and local ML dependencies. Prefer creating your own isolated virtual environment, pinning reviewed dependency versions, avoiding the bundled install fallback, and removing the /tmp/whisper-venv sys.path behavior before use on sensitive machines or shared systems.
scripts/transcribe.py:19Python Import-Path Hijacking Through a Shared Temporary Directory
scripts/install.py:56Unpinned Runtime Dependencies Permit Unreviewed Supply-Chain Changes
The README makes absolute privacy/offline claims ('No internet required', '100% private') that conflict with later statements that the first run downloads Whisper models from external sources. This can mislead users operating in restricted or sensitive environments into running the skill under false assumptions about network access and supply-chain exposure.
The note mentions model download size but does not clearly warn, near the primary privacy/offline claims, that first use requires internet connectivity and pulls executable/model artifacts from external sources. In privacy-sensitive or air-gapped contexts, that omission can cause policy violations or unexpected outbound connections.
The skill documentation instructs users to run local scripts that can write files and invoke shell operations, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization and transparency gap: an agent or reviewer cannot easily determine what the skill is expected to access, increasing the risk of unintended file modification or command execution if the implementation is changed or abused.
The installer documentation claims it creates a virtual environment and installs dependencies, but the code may instead fall back to system-wide installation. This mismatch is security-relevant because users may trust the script to remain isolated when it can actually modify the host environment and bypass package-management boundaries.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import venv
venv.main(['--without-pip', venv_dir])
# Manually install pip
subprocess.run(
[sys.executable, '-m', 'ensurepip', '--upgrade', '--default-pip'],
cwd=venv_dir, capture_output=True
)
The installer explicitly falls back to system pip when virtual environment setup fails, causing dependencies to be installed into the host Python environment. This is dangerous because it broadens package changes beyond the skill, can break OS-managed Python packages, and increases exposure to supply-chain issues from third-party dependencies.
The installer may proceed to system-level package modification with --break-system-packages without upfront warning or explicit user confirmation. This is dangerous because it bypasses normal environment protections and can alter system Python in a way users did not knowingly authorize.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
for pkg in packages:
print(f" → Installing {pkg}...")
result = subprocess.run(
[pip_path, 'install', pkg],
capture_output=True, text=True
)
This retry path uses pip install --break-system-packages, bypassing distribution safeguards and potentially writing into the system Python environment. That is risky because an installer for an ordinary local transcription skill should not silently escalate from isolated install to host-level package modification without explicit consent.
)
if result.returncode != 0:
print(f" ⚠️ pip failed, trying with --break-system-packages...")
result = subprocess.run(
[pip_path, 'install', '--break-system-packages', pkg],
capture_output=True, text=True
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Install PyTorch (CPU)
print(f" → Installing torch (CPU)...")
result = subprocess.run(
[pip_path, 'install', 'torch', '--index-url', 'https://download.pytorch.org/whl/cpu'],
capture_output=True, text=True
)
This call retries installation with --break-system-packages, which can override Python environment protections and modify the system interpreter outside an isolated virtual environment. In a one-click installer for a speech-to-text skill, that behavior expands the blast radius from the skill's sandbox to the host system and can destabilize or silently alter system-managed packages.
)
if result.returncode != 0:
print(f" ⚠️ Retrying torch install...")
result = subprocess.run(
[pip_path, 'install', '--break-system-packages', 'torch',
'--index-url', 'https://download.pytorch.org/whl/cpu'],
capture_output=True, text=True
Claims such as 'No telemetry' and 'No data ever leaves your machine' are overbroad in context because installation and model acquisition contact third-party repositories. While this does not necessarily exfiltrate user audio, it creates inaccurate security assurances about network behavior and external dependencies.
The dependency is specified with a lower bound only, so builds may resolve to different versions over time. This weakens reproducibility and can unintentionally introduce vulnerable or breaking upstream releases into the environment.
openai-whisper>=20231117
soundfile>=0.12.0
numpy>=1.21.0
torch>=2.0.0
The dependency is unpinned and may float to any newer release that satisfies the minimum version. That increases supply-chain risk and makes it harder to verify that tested and deployed environments use the same package set.
openai-whisper>=20231117
soundfile>=0.12.0
numpy>=1.21.0
torch>=2.0.0
Using an unpinned numpy version allows installation of an arbitrary future compatible release, which may contain security issues or incompatible behavior. In this file, that concern is slightly elevated because numpy has multiple historical advisories and the manifest does not constrain to a reviewed version.
openai-whisper>=20231117
soundfile>=0.12.0
numpy>=1.21.0
torch>=2.0.0
The manifest does not pin numpy, so it is impossible to determine whether installations will receive a version affected by known advisories. This is primarily a dependency-hygiene and supply-chain exposure issue rather than proof of an active exploitable flaw in the skill itself.
An unpinned torch dependency is riskier than a typical library because PyTorch has had serious advisories, including code-execution and denial-of-service issues in some usage patterns. Without pinning, deployments may pick up an unreviewed release, increasing supply-chain and vulnerability exposure.
openai-whisper>=20231117
soundfile>=0.12.0
numpy>=1.21.0
torch>=2.0.0
Torch has a history of high-impact advisories, and because the version is not pinned, consumers may install a vulnerable build without realizing it. In a voice-recognition skill that processes user-supplied media locally, this does not by itself prove exploitability, but it increases the risk surface substantially if vulnerable torch functionality is present in the environment.