Back to skill

Security audit

Agentic Letters

Security checks for vulnerabilities and agentic risk

Overview

This skill performs its stated mailing function, but it can send sensitive PDFs and recipient data to a third-party service, spend credits, and keep local PII records without strong confirmation or permission hardening.

Install only if you are comfortable with PDFs, recipient names and addresses, and letter metadata being sent to agentic-letters.com and with credits being consumed for real mail. Before use, require a final manual confirmation for the exact PDF, recipient, country, and cost; store the API key and records with owner-only permissions; and periodically delete records you no longer need.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:31
Finding

API key file may be readable by other local users

Content
View full analysis
~/.openclaw/secrets/agentic_letters.env ``` ### Technical Analysis The documented setup procedure creates the secrets directory and API key file without explicitly assigning restrictive filesystem permissions. Their resulting modes therefore depend on the user's current `umask`. With a common `022` umask, the directory may be created as `0755` and the credential file as `0644`. The file contains a bearer token associated with the user's paid AgenticLetters credits. Possession of this token is sufficient to authenticate requests to the service. This access is not required for the Skill's declared functionality. Only the account running the Skill needs to read the credential. ### Attack Path 1. A victim follows the documented setup commands under a permissive `umask`. 2. The secrets directory and API key file are created with group-readable or world-readable permissions. 3. Another local account traverses the victim's home directory, where permitted, and reads `~/.openclaw/secrets/agentic_letters.env`. 4. The attacker extracts the `AGENTIC_LETTERS_API_KEY` bearer token. 5. The attacker submits authenticated requests to the AgenticLetters API, potentially sending letters, consuming paid credits, or querying API-accessible letter information. Exploitation requires local filesystem access and sufficient permission to traverse the victim's home directory. ### Impact Assessment An attacker who obtains the token gains the API capabilities assigned to that token. Based on the audited client, these capabilities include submitting physical letters, listing letters, retrieving letter status, and checking remaining credits. The impact is limited to the AgenticLetters account and API authorization s ...[truncated 231 chars]
Remediation
View remediation
~/.openclaw/secrets/agentic_letters.env chmod 600 ~/.openclaw/secrets/agentic_letters.env ``` Additional hardening should include: 1. Prefer an operating-system credential store or secret manager over a plaintext environment file. 2. Validate the permissions and ownership of the credential file before reading it. 3. Refuse to use a credential file owned by another account or writable by group/other users. 4. Document token revocation or rotation procedures for suspected exposure. 5. Advise existing users to apply `chmod 700` to the directory and `chmod 600` to the file. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
agentic_letters.py:165
Finding

Recipient personally identifiable information is stored with default filesystem permissions

Content
View full analysis
Path: p = Path(RECORDS_DIR) p.mkdir(parents=True, exist_ok=True) return p def save_record(send_result: dict, recipient: dict, label: str | None) -> Path: """Save a letter record after successful send.""" records = _ensure_records_dir() letter_id = send_result["id"] date = datetime.now(timezone.utc).strftime("%Y-%m-%d") record = { "id": letter_id, "status": send_result.get("status", "queued"), "type": send_result.get("type", "standard"), "label": label, "recipient": recipient, "created_at": send_result.get("created_at", datetime.now(timezone.utc).isoformat()), "credits_remaining": send_result.get("credits_remaining"), "last_checked": None, } path = records / f"{date}_{letter_id[:8]}.json" path.write_text(json.dumps(record, indent=2, ensure_ascii=False)) return path ``` ### Technical Analysis The Skill stores each recipient's name, street address, postal code, city, country, letter label, delivery status, and identifier in a plaintext JSON record. Neither the records directory nor the generated files are assigned explicit owner-only permissions. Consequently, access controls depend on the process `umask` and existing parent-directory permissions. Under permissive defaults, record files may be readable by other local users. Labels may also reveal sensitive context, such as legal complaints, cancellations, appeals, or data-protection requests. Local record keeping is disclosed in `SKILL.md`, but allowing unrelated local accounts to read those records exceeds the minimum privileges needed to track letter status. ### Attack Path 1. A user sends a letter through the Skill. 2. `_ensure_records_dir()` creates ...[truncated 1023 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description says the skill sends physical letters in Germany, but the documented behavior also queries account status, lists historical letters, persists local records, and even exposes a country flag inconsistent with the Germany-only claim. This mismatch can mislead users and orchestrators about what data is accessed, stored, and transmitted, causing unauthorized disclosure of recipient data and unintended actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill does not prominently warn that PDFs, recipient names, street addresses, and related metadata will be transmitted to a third-party mailing provider. Because letters often contain legal, identity, or complaint content, omission of this warning undermines informed consent and can expose highly sensitive personal data to an external processor.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares no explicit tool scope even though it uses environment variables, filesystem reads/writes, and network access. Missing scope constraints increases the chance that an agent invokes the skill with broader capabilities than users expect, reducing transparency and weakening least-privilege controls.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger guidance includes broad phrases like 'send a letter' without requiring confirmation, consent, or clear preconditions before sending data to an external service. In an agentic setting, overly permissive triggers raise the risk of accidental invocation and unintended transmission of sensitive documents and addresses.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
76% confidence
Finding

The setup instructs storing a long-lived API key in a persistent plaintext file under the user's home directory. While common, this creates session persistence and credential exposure risk if the environment is shared, backed up insecurely, or later accessed by other tools or users.

Content

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

Setup

bash
mkdir -p ~/.openclaw/secrets
echo 'AGENTIC_LETTERS_API_KEY=al_your_api_key' > ~/.openclaw/secrets/agentic_letters.env

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill claims Germany-only delivery, but send_letter and the CLI accept arbitrary country codes and pass them directly to the remote API. This mismatch can cause unauthorized or unintended international mailings, increasing cost and violating user expectations or policy constraints established by the skill description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The code base64-encodes and transmits the full PDF letter plus recipient name and address to a third-party API, but provides no explicit user-facing disclosure or consent step for this sensitive data transfer. In an agentic workflow, users may assume a local action, so undisclosed off-device transmission creates privacy and compliance risks for personal or confidential correspondence.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description frames the tool as a single-purpose letter-sending capability, but the CLI also exposes account-wide listing and credit-balance operations. In an agent setting, this broadens the accessible privilege surface beyond the declared task, enabling unnecessary access to potentially sensitive account metadata and operational history.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

After sending a letter, the skill stores recipient personal data and metadata in local JSON records under the workspace without warning the user or applying any access protections. This creates a residual privacy risk because names, addresses, and mailing history may remain accessible to other tools, users, or processes on the host.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.