Back to skill

Security audit

Whisper ASR — Speech-to-Text

Security checks for vulnerabilities and agentic risk

Overview

This ASR skill is mostly coherent, but its default engine executes unpinned remote model code without making that risk clear to users.

Review carefully before installing. Use this only in an isolated environment without sensitive files or credentials, prefer the Whisper engine if acceptable, and require pinned dependencies/model revisions or removal of trust_remote_code=True before broad use.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/asr.py:38
Finding
Unpinned Remote Model Code Is Trusted and Executed## Vulnerability Details **File Location**: `scripts/asr.py`, lines 38–42 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: High **Vulnerable Code**: ```python model = AutoModel( model='iic/SenseVoiceSmall', trust_remote_code=True, device='cuda:0', ) ``` ### Technical Analysis The default FunASR execution path loads the `iic/SenseVoiceSmall` model with `trust_remote_code=True`. This setting authorizes executable Python code supplied by the remote model repository to run in the local process. The model reference is not pinned to an immutable revision, commit identifier, or verified artifact hash. Consequently, the code executed during a future model load can differ from the code available when this Skill was reviewed. This creates a remote code execution supply-chain boundary rather than merely downloading passive model weights. The behavior is especially significant because FunASR is the default engine. A normal invocation of the Skill can therefore reach this code without the user explicitly opting into remote code execution. ### Attack Path 1. An attacker compromises the upstream model repository, its publisher account, or another relevant artifact-delivery component. 2. The attacker modifies the repository's custom model-loading implementation or another remotely loaded executable file. 3. A user invokes the Skill with the default FunASR engine. 4. `AutoModel` retrieves the current contents associated with `iic/SenseVoiceSmall`. 5. Because `trust_remote_code=True` is enabled, the attacker's code executes inside the ASR process. 6. The code can act with the same operating-system identity and environmental access as that process. ### Impact Assessment Successful exploitation provides arbitrary code execution with the privileges of the user running the Skill. Depending on the surrounding runtime configuration, malicious remote code could read or alter accessible fi ...[truncated 456 chars]
Remediation
## Remediation Suggestions 1. Remove `trust_remote_code=True` and use a model implementation provided by a locally installed, reviewed library whenever possible. 2. If custom model code is unavoidable, pin the model to an audited immutable revision rather than a mutable repository name. 3. Verify downloaded model and code artifacts using approved cryptographic hashes or signatures before loading them. 4. Consider vendoring the reviewed model implementation into the project so that executable code is covered by normal source review and release controls. 5. Run model loading and inference in a dedicated sandbox or container with: - No unnecessary credentials or secrets. - Read-only access to input files. - A dedicated writable cache and output directory. - Restricted outbound network access. - Minimal operating-system privileges. 6. Separate artifact download from execution: fetch and verify artifacts during a controlled installation phase, then perform inference with network access disabled. 7. Document explicitly that loading remote custom code is required if this behavior cannot be removed.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:85
Finding
Dependencies and Downloaded Model Artifacts Are Not Version or Integrity Pinned## Vulnerability Details **File Location**: `SKILL.md`, lines 85–90; related installation messages in `scripts/asr.py`, lines 32–35 and 79–82 **Vulnerability Type**: Insecure dependency and model supply-chain configuration **Risk Level**: Medium **Vulnerable Documentation**: ```markdown ## Dependencies - `funasr` + `modelscope` (FunASR engine) - `openai-whisper` (Whisper engine) - `imageio-ffmpeg` (bundled ffmpeg binary) - First run downloads model weights (auto-cached in `~/.cache/`) ``` **Related Installation Guidance in Code**: ```python try: from funasr import AutoModel except ImportError: print("❌ funasr not installed. Run: pip install funasr modelscope", file=sys.stderr) sys.exit(1) ``` ```python try: import whisper except ImportError: print("❌ whisper not installed. Run: pip install openai-whisper", file=sys.stderr) sys.exit(1) ``` ### Technical Analysis The project names its third-party packages but supplies no lockfile, exact versions, package hashes, trusted index configuration, or model artifact integrity values. Its runtime error messages directly recommend unversioned `pip install` commands. Unpinned installation means the resolved package contents can change between installations. First-run model downloads are likewise described without an immutable revision or integrity-verification mechanism. This prevents reproducible review and allows newly published or compromised upstream artifacts to enter the execution environment without any corresponding change to this repository. This finding concerns supply-chain hardening. The audit did not find evidence that the currently named packages are intentionally malicious. ### Attack Path 1. An attacker compromises an upstream package or model publisher, release pipeline, registry account, or artifact-delivery path. 2. A malicious release or model artifact is published under one of the names used by the proje ...[truncated 1017 chars]
Remediation
## Remediation Suggestions 1. Add a reviewed dependency lockfile containing exact versions for `funasr`, `modelscope`, `openai-whisper`, `imageio-ffmpeg`, and all transitive dependencies. 2. Require cryptographic hashes during installation, for example through a hash-locked requirements file and `pip --require-hashes`. 3. Replace unversioned installation messages with a command that installs from the project's audited lockfile. 4. Restrict installation to an explicitly configured trusted package index and disable unintended extra indexes to reduce dependency-confusion exposure. 5. Pin every downloaded model to an immutable revision or commit and verify its expected digest before loading it. 6. Maintain an approved-artifact manifest recording package versions, model revisions, hashes, and source registries. 7. Scan locked dependencies and model-loading libraries for known vulnerabilities as part of release and update workflows. 8. Test dependency upgrades in isolation and require a new security review before updating the lockfile or model manifest.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The manifest describes a Whisper-only local ASR skill, but the documented behavior includes a second engine, translation functionality, and file-output capability. This mismatch can mislead users and reviewers about what the skill actually does, increasing the chance that broader functionality such as saving transcripts or transforming content is used without informed consent or proper policy review.

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill documents capabilities that imply file output and likely environment/runtime interaction, but it declares no explicit tool scope or permissions boundary. This creates a transparency and governance problem: a caller may invoke a skill that writes files or accesses process environment without those capabilities being clearly declared and reviewable.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest text materially understates the skill's functionality by claiming only Whisper-based ASR while the body documents FunASR/SenseVoice support and translation. Security reviews, allowlists, and user decisions often rely on manifest summaries, so inaccurate declarations weaken trust boundaries and can conceal behavior that should be separately assessed.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest description says the skill provides automatic speech recognition using OpenAI Whisper, implying Whisper is the operative engine. However, the code contains a full FunASR/SenseVoice implementation and even makes it the default engine in the CLI, which materially expands or changes the described behavior rather than being a minor implementation detail.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest states the skill performs automatic speech recognition, which normally means speech-to-text in the source language. The code additionally allows `--task translate` for Whisper, enabling translation behavior that is not disclosed in the manifest description.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The skill notes in dependencies that first run downloads model weights into the user's home cache, but it does not present this as a clear warning in the main description or usage flow. Automatic downloads and persistent caching can have privacy, storage, and supply-chain implications, especially in restricted or offline environments, even if they are common for ML tools.

Static analysis

No suspicious patterns detected.