Back to skill

Security audit

MAI Voice

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it sends an Azure speech key and user text to a URL built from an unvalidated region setting.

Review this before installing if you will use real Azure credentials or sensitive text. Only set AZURE_SPEECH_REGION from a trusted Azure resource value such as eastus, avoid submitting secrets or regulated personal data as speech input, and prefer adding region validation before using the skill in shared or automated environments.

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/speak.sh:143
Finding

Azure Speech API Key Exfiltration Through Unvalidated Region Endpoint

Content
View full analysis
Remediation
View remediation
&2 exit 1 ;; esac ``` If maintaining an allowlist is impractical, enforce a strict region syntax that excludes URL delimiters and other authority-changing characters: ```bash if [[ ! "${AZURE_SPEECH_REGION}" =~ ^[a-z0-9]+$ ]]; then echo "Invalid AZURE_SPEECH_REGION" >&2 exit 1 fi ``` Additional hardening should include: 1. Constructing endpoints from a trusted mapping of supported region names to fixed Azure hostnames. 2. Rejecting values containing `/`, `\`, `:`, `@`, dots, whitespace, percent encoding, or control characters. 3. Verifying that the final hostname exactly matches an expected Azure Speech hostname before invoking `curl`. 4. Avoiding user-controlled endpoint overrides when requests carry subscription keys. 5. Rotating the Azure Speech key if the script has already been run with an untrusted region value. 6. Adding tests that confirm malicious values such as `attacker.example/path`, `eastus@attacker.example`, and values containing whitespace are rejected before any network request occurs. ]]>
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)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/speak.sh (reported line 149)May include surrounding context.

sh
url="https://${AZURE_SPEECH_REGION}.tts.speech.microsoft.com/cognitiveservices/v1"

curl -sS --fail-with-body \
  -X POST "$url" \
  -H "Ocp-Apim-Subscription-Key: ${AZURE_SPEECH_KEY}" \
  -H "Content-Type: application/ssml+xml" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This shell script sends user-provided text or text-file contents to a remote Azure Speech endpoint and writes the returned audio to disk. While the usage text documents required parameters, it does not disclose that input content leaves the local system or that an output file is created automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README instructs users to send arbitrary text to Azure Speech REST API but does not explicitly warn that the provided text will be transmitted to a third-party cloud service. This creates a privacy and data-handling risk because users may unknowingly submit sensitive or regulated content to an external provider.

Content

No source excerpt is available for this finding.