Back to skill

Security audit

agent-call

Security checks for vulnerabilities and agentic risk

Overview

This Twilio calling skill does what it claims, but its high-impact phone/SMS powers and unsafe shell input handling need human review before use.

Install only if you trust the publisher and can restrict who controls call/SMS inputs. Use environment-injected or protected Twilio credentials, test only with owned numbers, require explicit approval before calls/SMS or recording/transcription, restrict callback hosts to HTTPS endpoints you control, and avoid passing untrusted text into these scripts until the Python, TwiML, and form-encoding issues are fixed.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/make-call.sh:104
Finding

Arbitrary Local Code Execution Through Python Source Injection

Content
View full analysis
$MESSAGE" if [[ "$URGENT" == "true" ]]; then TWIML="${TWIML}This is an urgent message. Please respond immediately." fi TWIML="${TWIML}" # URL encode TwiML TWIML_ENCODED=$(python3 -c "import urllib.parse; print(urllib.parse.quote('''$TWIML'''))") ``` ### Technical Analysis The user-controlled `--message` and `--voice` arguments are incorporated into `TWIML`, which is then interpolated directly into Python source supplied through `python3 -c`. Triple-quoted Python strings do not make this safe. An attacker can include `'''` in an argument to terminate the string literal and append arbitrary Python statements. Because Python is executed locally before the Twilio request is sent, the injected statements execute with the operating-system privileges of the user or Agent invoking the Skill. For example, a message shaped like the following can break out of the generated Python literal: ```text '''); __import__('os').system('ATTACKER_COMMAND'); # ``` The final comment marker can suppress the remainder of the generated one-line Python program. ### Attack Path 1. An attacker obtains influence over a value passed to `--message` or `--voice`. This may occur directly or when an Agent incorporates external content into a call. 2. The attacker supplies a value that closes the `'''...'''` Python string. 3. The attacker appends a Python statement such as a call to `os.system`. 4. `scripts/make-call.sh` interpolates the malicious value into the `python3 -c` program. 5. Python executes the injected statement locally while URL-encoding the TwiML. 6. The injected process inherits the invoking user's permissions and environment. ### Impact ...[truncated 629 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/make-call.sh:104
Finding

TwiML Injection Through Unescaped Message and Voice Values

Content
View full analysis
$MESSAGE" if [[ "$URGENT" == "true" ]]; then TWIML="${TWIML}This is an urgent message. Please respond immediately." fi TWIML="${TWIML}" ``` ### Technical Analysis `MESSAGE` is inserted directly into an XML text node, while `VOICE` is inserted directly into an XML attribute. Neither value is XML-escaped or validated. An attacker controlling `MESSAGE` can close the `` element and inject additional TwiML verbs. An attacker controlling `VOICE` can terminate the attribute and alter the structure of the `` element. Depending on what Twilio accepts, injected TwiML could include call-control operations such as ``, ``, ``, or ``. URL-encoding the finished TwiML does not mitigate this issue. URL encoding preserves the malicious XML structure for Twilio to decode and interpret. ### Attack Path 1. An attacker influences the `--message` or `--voice` argument. 2. The supplied value contains XML delimiters that escape the intended text node or attribute. 3. The script concatenates the value into the TwiML document without escaping it. 4. The document is URL-encoded and submitted to Twilio. 5. Twilio parses the injected elements as call-control instructions. 6. The resulting call can perform actions not intended by the Agent or operator. ### Impact Assessment Potential consequences include: - Unauthorized modification of the call flow. - Dialing or redirecting calls to attacker-selected destinations. - Initiating recordings without the intended workflow. - Fetching media or TwiML from attacker-controlled locations. - Disclosure of call-related information to external services. - Unexpected telecommunicat ...[truncated 217 chars]
Remediation
View remediation
`, `&`, single quotes, and double quotes. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/make-call.sh:114
Finding

Twilio Call Request Parameter Injection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sms-notify.sh:67
Finding

Twilio SMS Request Parameter Injection

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (20)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README promotes autonomous calling and SMS features that can trigger external network actions affecting third parties, but it does not clearly warn users about consent, privacy, cost, and misuse risks. In an agent skill context, this omission increases the chance that users deploy outbound communications without understanding that the agent may contact real phone numbers or incur charges.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The README instructs users to store long-lived Twilio credentials in a predictable plaintext file under the home directory, which can increase exposure if local permissions are weak, backups are shared, or other tools/processes can read that path. While common in developer tooling, this is still a credential-handling weakness because compromise of the file would enable unauthorized calls, SMS, and account abuse.

Content

Scanner excerpt · README.md (reported line 14)May include surrounding context.

  1. Configure Twilio Credentials:

Create ~/.clawdbot/twilio-config.json:

json
{
  "accountSid": "YOUR_ACCOUNT_SID",

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The skill recommends storing long-lived Twilio credentials in a persistent plaintext file under the user's home directory. If local permissions are weak, the host is multi-user, backups are exposed, or other tools can read that path, an attacker could steal API credentials and place calls, send SMS, access recordings, or harvest metadata.

Content

Scanner excerpt · SKILL.md (reported line 25)May include surrounding context.

1. Configure Credentials

Create a file at ~/.clawdbot/twilio-config.json:

json
{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs users to configure webhooks and status callbacks to external URLs without clearly warning that call metadata, caller numbers, timestamps, status, and possibly other event data will be transmitted to third-party servers. Users may unknowingly expose sensitive telecommunications metadata to infrastructure they do not control or have not secured properly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly supports call recording and transcription but does not provide a clear warning about consent, privacy obligations, or jurisdiction-specific wiretapping/recording laws. This can lead users to deploy legally sensitive functionality without notice, causing unauthorized collection of voice content and transcripts.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · SKILL.md (reported line 298)May include surrounding context.

bash
# Test webhook
curl -X POST https://your-server.com/voice \
  -d "Called=+15551234567" \
  -d "From=+15559876543"

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script description materially understates its capabilities: beyond checking call status, it can also fetch recordings and print transcription content. In an agent skill context, this mismatch increases the risk of users or higher-level orchestration invoking a tool that accesses sensitive call content without clearly understanding that scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script can save call recordings to an arbitrary output path with no privacy warning, confirmation step, or file-permission hardening. In an agent environment, this creates a real risk of silently persisting sensitive audio to disk where it may be retained, indexed, or exposed to other local users/processes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Printing transcription text directly to stdout can expose sensitive conversation content into terminal logs, agent traces, CI logs, or chat transcripts without any warning. Because transcripts often contain personal, financial, or authentication-related data, this is a meaningful confidentiality issue in an agentic skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script enables call recording and transcription based solely on flags, but it provides no built-in privacy notice, consent check, or jurisdiction-aware warning before capturing call audio. In an agentic calling context, this is dangerous because automated outbound calls may be placed across regions with two-party consent requirements, creating legal, privacy, and compliance exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This shell script reads authentication secrets from a local config file and environment variables, then uses them to send an SMS via Twilio. While it logs the send action, it does not disclose that it accesses sensitive credentials, which falls under missing user warnings for code files.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/call-status.sh (reported line 80)May include surrounding context.

sh
fi

# Build request
API_URL="https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json"
FORM_DATA="To=${TO_NUMBER}&From=${TWILIO_PHONE_NUMBER}&Body=${MESSAGE}"

if [[ -n "$MEDIA_URL" ]]; then

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/call-status.sh (reported line 90)May include surrounding context.

sh
fi

# Build request
API_URL="https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json"
FORM_DATA="To=${TO_NUMBER}&From=${TWILIO_PHONE_NUMBER}&Body=${MESSAGE}"

if [[ -n "$MEDIA_URL" ]]; then

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/call-status.sh (reported line 100)May include surrounding context.

sh
fi

# Build request
API_URL="https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json"
FORM_DATA="To=${TO_NUMBER}&From=${TWILIO_PHONE_NUMBER}&Body=${MESSAGE}"

if [[ -n "$MEDIA_URL" ]]; then

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/call-status.sh (reported line 109)May include surrounding context.

sh
fi

# Build request
API_URL="https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json"
FORM_DATA="To=${TO_NUMBER}&From=${TWILIO_PHONE_NUMBER}&Body=${MESSAGE}"

if [[ -n "$MEDIA_URL" ]]; then

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/call-status.sh (reported line 120)May include surrounding context.

sh
fi

# Build request
API_URL="https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json"
FORM_DATA="To=${TO_NUMBER}&From=${TWILIO_PHONE_NUMBER}&Body=${MESSAGE}"

if [[ -n "$MEDIA_URL" ]]; then

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/make-call.sh (reported line 115)May include surrounding context.

sh
fi

# Build request
API_URL="https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json"
FORM_DATA="To=${TO_NUMBER}&From=${TWILIO_PHONE_NUMBER}&Body=${MESSAGE}"

if [[ -n "$MEDIA_URL" ]]; then

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/sms-notify.sh (reported line 68)May include surrounding context.

sh
fi

# Build request
API_URL="https://api.twilio.com/2010-04-01/Accounts/${TWILIO_ACCOUNT_SID}/Messages.json"
FORM_DATA="To=${TO_NUMBER}&From=${TWILIO_PHONE_NUMBER}&Body=${MESSAGE}"

if [[ -n "$MEDIA_URL" ]]; then

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/make-call.sh (reported line 133)May include surrounding context.

sh
# Send SMS
echo "Sending SMS to ${TO_NUMBER}..."
RESPONSE=$(curl -s -X POST "$API_URL" \
  -u "${TWILIO_ACCOUNT_SID}:${TWILIO_AUTH_TOKEN}" \
  -d "$FORM_DATA")

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/sms-notify.sh (reported line 77)May include surrounding context.

sh
# Send SMS
echo "Sending SMS to ${TO_NUMBER}..."
RESPONSE=$(curl -s -X POST "$API_URL" \
  -u "${TWILIO_ACCOUNT_SID}:${TWILIO_AUTH_TOKEN}" \
  -d "$FORM_DATA")