Back to skill

Security audit

Openai Whisper Api

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward OpenAI transcription helper, but users should understand that selected audio is uploaded to OpenAI with their API key.

Install this only if you are comfortable sending the audio files you choose, plus any prompt/language/model fields, to OpenAI using your API key. Avoid sensitive or regulated recordings unless your policy allows that external processing.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/transcribe.sh:71
Finding
Curl Option Injection Through Unquoted Optional Argument Expansion## Vulnerability Details **File Location**: `scripts/transcribe.sh`, lines 71–79 **Vulnerability Type**: Argument injection caused by unquoted shell expansion **Risk Level**: Medium **Vulnerable Code**: ```bash curl -sS https://api.openai.com/v1/audio/transcriptions \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Accept: application/json" \ -F "file=@${in}" \ -F "model=${model}" \ -F "response_format=${response_format}" \ ${language:+-F "language=${language}"} \ ${prompt:+-F "prompt=${prompt}"} \ >"$out" ``` ### Technical Analysis The optional `language` and `prompt` arguments are incorporated into the `curl` command through unquoted parameter expansions: ```bash ${language:+-F "language=${language}"} ${prompt:+-F "prompt=${prompt}"} ``` Shell quotation marks generated inside a parameter expansion do not become shell syntax. They remain literal characters. Because the outer expansions are unquoted, their results are subject to word splitting and pathname expansion. Consequently, whitespace in an attacker-controlled `--language` or `--prompt` value can divide the expansion into multiple command-line arguments. Tokens beginning with a hyphen can then be interpreted by `curl` as additional options rather than as part of a multipart form value. Glob characters may also expand to local filesystem paths. This is an argument-injection vulnerability rather than direct shell-command injection: shell metacharacters embedded in the variable are not reparsed as shell syntax. Nevertheless, injected `curl` options can materially alter network and file behavior. ### Attack Path 1. An attacker influences a prompt or language value passed to the skill, such as through untrusted content that an agent uses when constructing the transcription request. 2. The caller preserves that content as one argument to `--prompt` or `--language`. 3. The script stores the content in `prompt` or `language`. 4. T ...[truncated 1702 chars]
Remediation
## Remediation Suggestions Construct the complete `curl` argument list using a Bash array. Append each optional form field as a distinct array element so that attacker-controlled whitespace and wildcard characters cannot create additional arguments: ```bash curl_args=( -sS "https://api.openai.com/v1/audio/transcriptions" -H "Authorization: Bearer $OPENAI_API_KEY" -H "Accept: application/json" -F "file=@${in}" -F "model=${model}" -F "response_format=${response_format}" ) if [[ -n "$language" ]]; then curl_args+=(-F "language=${language}") fi if [[ -n "$prompt" ]]; then curl_args+=(-F "prompt=${prompt}") fi curl "${curl_args[@]}" >"$out" ``` Additionally: - Validate `language` against the expected language-code syntax or an explicit allowlist. - Validate `model` against supported model identifiers. - Consider constraining the output path if arguments may originate from untrusted users. - Use `curl --fail-with-body` and write to a temporary file followed by an atomic rename, preventing API error responses or interrupted transfers from replacing a valid output file. - Add regression tests containing spaces, leading hyphens, wildcard characters, and option-like prompt values to verify that every form value remains exactly one `curl` argument.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill explicitly instructs users to run a shell script (`scripts/transcribe.sh`) but the metadata declares only required binaries and environment variables, not the shell/code-execution capability. This mismatch weakens security review and permission transparency, making it easier for a user or platform to underestimate what the skill can execute.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill sends user-provided audio to OpenAI’s external transcription API, but the description and usage text do not clearly warn about this data egress. Users may unknowingly transmit sensitive conversations, personal data, or regulated content to a third party, creating privacy, compliance, and confidentiality risk.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The script uploads the provided audio file to OpenAI's remote transcription API, but it does not give any explicit user-facing warning or confirmation that local audio content will be transmitted off-host. This is risky because users may unknowingly send sensitive voice data, background speech, or regulated information to a third-party service.

External Transmission

Medium
Category
Data Exfiltration
Content
mkdir -p "$(dirname "$out")"

curl -sS https://api.openai.com/v1/audio/transcriptions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Accept: application/json" \
  -F "file=@${in}" \
Confidence
89% confidence
Finding
The script performs an external network transmission to https://api.openai.com/v1/audio/transcriptions and includes the user-supplied audio file in the request body. In the context of a transcription skill this is expected behavior, but it still creates a real data-exposure boundary because potentially sensitive local content is sent to a remote service.

Static analysis

No suspicious patterns detected.