Back to skill

Security audit

android-sms-gateway-local

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it handles SMS messages and gateway credentials over under-protected local HTTP workflows that users should review carefully before installing.

Install only if you understand that this skill can send SMS, access message status, register webhooks, and replay inbox messages through your gateway credentials. Use it only on a trusted network or behind TLS/VPN/loopback protection, avoid shared Wi-Fi, verify webhook ownership and HTTPS, keep export time windows narrow, and rotate credentials if they may have been sent over an untrusted network.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/health.sh:4
Finding

Basic Authentication Credentials and SMS Data Transmitted over Plaintext HTTP

Content
View full analysis
:`. - Local Server supports Basic Auth only; include credentials in every request. - Validate connectivity first with `GET /health`, then list devices with `GET /devices`. ``` The documented configuration is used directly by scripts such as `scripts/health.sh`: ```bash BASE_URL="${SMS_GATE_BASE_URL:-}" USER="${SMS_GATE_USER:-}" PASS="${SMS_GATE_PASS:-}" if [[ -z "$BASE_URL" ]]; then echo "SMS_GATE_BASE_URL is required"; exit 1; fi if [[ -z "$USER" ]]; then echo "SMS_GATE_USER is required"; exit 1; fi if [[ -z "$PASS" ]]; then echo "SMS_GATE_PASS is required"; exit 1; fi BASE_URL="${BASE_URL%/}" curl -sS -u "$USER:$PASS" "$BASE_URL/health" ``` Equivalent authenticated requests occur in every script in the `scripts/` directory. ### Technical Analysis HTTP Basic Authentication encodes the username and password but does not encrypt them. The project explicitly documents an `http://` base URL and passes credentials to curl using `-u`. When that documented configuration is used, gateway credentials and API traffic are transmitted without transport confidentiality or server authentication. The exposed traffic may include: - The SMS gateway username and password. - Message text and recipient phone numbers. - Inbox and message history. - Device identifiers and status information. - Webhook URLs and event configuration. - Requests to send messages or delete webhooks. The scripts neither require HTTPS nor restrict plaintext HTTP connections to loopback. They also provide no explicit warning or opt-in requirement before credentials are sent over plaintext transport. ### Attack Path 1. A user follows the do ...[truncated 1621 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/send_sms.sh:21
Finding

Environment-Controlled Values Are Inserted into JSON Without Complete Serialization

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/list_messages.sh:20
Finding

Unencoded Query Values and Path Identifiers Permit Request-Target Manipulation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · .gitignore (reported line 1)May include surrounding context.

text
.env
.env.*
*.log
*.secret

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 55)May include surrounding context.

md
## Webhooks Management

- `GET /webhooks`
- `DELETE /webhooks/{id}`

## Test Scripts (Bash + curl)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill explicitly directs use of shell scripts but does not declare any tool scope or allowed-tools boundary. That omission weakens least-privilege controls, making it easier for an agent runtime to invoke broader shell capabilities than the skill actually needs and reducing review visibility into what code execution is expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs connecting to the gateway over plain HTTP while sending Basic Auth credentials on every request. On any shared or untrusted local network, an attacker who can observe traffic can recover credentials and potentially read SMS contents, webhook configuration, and other sensitive metadata in transit.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation explicitly describes exporting historical inbox messages by replaying them to a webhook, but it does not warn that this can expose sensitive SMS contents, metadata, or one-time codes to an external endpoint. In a skill centered on SMS gateway operations, omission of privacy and data-handling warnings increases the risk of accidental bulk exfiltration or noncompliant use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script issues an HTTP DELETE request to remove a webhook, which is a destructive operation. While it validates required inputs, it provides no confirmation prompt, no user-facing notice about the deletion, and no inline comment or docstring disclosing the irreversible action.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The script transmits sensitive inbox export data and Basic Auth credentials to whatever URL is supplied in SMS_GATE_BASE_URL, but it does not enforce HTTPS, validate the destination scheme, or require certificate-safe transport. If a user supplies an HTTP URL or a malicious local endpoint, SMS contents and credentials can be intercepted or redirected, which is especially sensitive given this skill handles SMS/MMS data.

Content

Scanner excerpt · scripts/export_inbox.sh (reported line 22)May include surrounding context.

sh
body="{\"deviceId\":\"$DEVICE_ID\",\"since\":\"$INBOX_SINCE\",\"until\":\"$INBOX_UNTIL\"}"

curl -sS -u "$USER:$PASS" -H "Content-Type: application/json" -d "$body" "$BASE_URL/messages/inbox/export"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This shell script performs an HTTP request that sends inbox export parameters and basic-auth credentials to a remote endpoint. While the script validates required variables, it does not include any confirmation prompt, user-facing log message, or explanatory comment/docstring warning that inbox data will be transmitted off-host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This shell script sends a network request to an external SMS gateway and uses credentials sourced from environment variables, but the operation has no confirmation prompt, user-facing log, or explanatory comment/docstring. For a code file, transmitting potentially sensitive data and using credentials without any disclosure matches the missing user warnings criteria.

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/register_webhook.sh (reported line 26)May include surrounding context.

sh
if [[ -n "$DEVICE_ID" ]]; then body+=",\"deviceId\":\"$DEVICE_ID\""; fi
body+="}"

curl -sS -u "$USER:$PASS" -H "Content-Type: application/json" -d "$body" "$BASE_URL/webhooks"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This shell script performs an HTTP request using credentials from environment variables and transmits the configured webhook URL and event to a remote endpoint. Aside from required-variable checks, there is no confirmation prompt or user-facing disclosure in the script before making the network-changing operation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
82% confidence
Finding

The script sends SMS content, recipient numbers, and Basic Auth credentials to whatever URL is placed in SMS_GATE_BASE_URL, but it does not enforce HTTPS or validate that the endpoint is local/trusted. If a user supplies an http:// URL or a malicious host, sensitive message data and credentials could be intercepted or disclosed in transit, which is more concerning because this skill handles private communications and authentication secrets.

Content

Scanner excerpt · scripts/send_sms.sh (reported line 49)May include surrounding context.

sh
if [[ -n "$SIM_NUMBER" ]]; then body+=",\"simNumber\":$SIM_NUMBER"; fi
body+="}"

curl -sS -u "$USER:$PASS" -H "Content-Type: application/json" -d "$body" "$BASE_URL/messages"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

At L49 the script transmits message text, phone numbers, and credentials to an external SMS gateway via curl. The file contains input validation, but no confirmation prompt, disclosure message, or explanatory comment/log warning the user that sensitive message content and recipient data will be sent off-host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script reads SMS_GATE_USER and SMS_GATE_PASS from environment variables, which are sensitive credentials. There is no accompanying comment, log message, or other user disclosure indicating that credentials will be consumed for authenticated export operations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.