Back to skill

Security audit

mail-addr-creator

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it handles admin credentials and returned mailbox secrets in ways that need careful review before installation.

Install only if you trust the environment and operator. Keep CLOUDFLARE_MAIL_API_URL unset unless you intentionally use a trusted endpoint, avoid passing secrets through command lines where possible, and treat all output files and transcripts as sensitive because they may contain mailbox JWTs or passwords.

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

Error
Location
scripts/create_address.py:57
Finding

Authentication credentials can be transmitted to an unrestricted API destination

Content
View full analysis
tuple[Optional[dict], Optional[str]]: admin_auth = args.admin_auth or os.getenv(ENV_ADMIN_AUTH) if not admin_auth: return None, f"missing admin credential: provide --admin-auth or {ENV_ADMIN_AUTH}" headers = { "Content-Type": "application/json", "x-admin-auth": admin_auth, } bearer_token = args.bearer_token or os.getenv(ENV_BEARER_TOKEN) if bearer_token: token = bearer_token.strip() headers["Authorization"] = token if token.lower().startswith("bearer ") else f"Bearer {token}" fingerprint = args.fingerprint or os.getenv(ENV_FINGERPRINT) if fingerprint: headers["x-fingerprint"] = fingerprint lang = args.lang or os.getenv(ENV_LANG) if lang: headers["x-lang"] = lang user_token = args.user_token or os.getenv(ENV_USER_TOKEN) if user_token: headers["x-user-token"] = user_token return headers, None ``` ```python def call_create_address( api_url: str, headers: dict, timeout: float, name: str, domain: str, enable_prefix: bool, ) -> dict: address = f"{name}@{domain}" body = json.dumps( { "enablePrefix": enable_prefix, "name": name, "domain": domain, } ).encode("utf-8") req = request.Request(api_url, data=body, headers=headers, method="POST") try: with request.urlopen(req, timeout=timeout) as response: ``` ### Technical Analysis The API destina ...[truncated 2480 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/create_address.py:151
Finding

Mailbox JWTs and passwords are exposed through standard output and insecure plaintext exports

Content
View full analysis
dict: payload = { "status": "created", "address": data.get("address") or fallback_address, "jwt": data.get("jwt"), "password": data.get("password"), "error": None, } if name is not None: payload["name"] = name return payload ``` ```python def emit_output(payload: dict, output_format: str, output_file: Optional[str]) -> None: rendered = json_text(payload) if output_format == "json" else csv_text(payload) if output_file: path = Path(output_file) if path.parent and not path.parent.exists(): path.parent.mkdir(parents=True, exist_ok=True) path.write_text(rendered, encoding="utf-8", newline="") print(rendered, end="" if rendered.endswith("\n") else "\n") ``` The Skill instruction reinforces this behavior: ```markdown Return the script's JSON output directly unless the user asks for a reformatted summary. ``` ### Technical Analysis The API response may contain mailbox JWTs and passwords. `success_result()` copies these values directly into the normalized result. `emit_output()` then prints the complete result to standard output in every case, including when the user selected an output file. Consequently, secrets can enter Agent transcripts, terminal scrollback, shell captures, CI logs, orchestration logs, or other standard-output collectors. CSV and JSON exports also store the credentials in plaintext. The file is created with process-default permissions instead of explicitly restrictive permissions, and the code does not perform symlink-safe or exclusive creation. Returning mailbox ac ...[truncated 1857 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Tainted flow: 'req' from os.getenv (line 256, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The script allows the destination API URL to be overridden from an environment variable or CLI argument, then sends highly sensitive headers such as x-admin-auth and bearer tokens to that URL. If an attacker can influence CLOUDFLARE_MAIL_API_URL or --api-url, they can redirect requests and exfiltrate admin credentials and mailbox creation secrets to an attacker-controlled endpoint.

Content

Scanner excerpt · scripts/create_address.py (reported line 259)May include surrounding context.

python
req = request.Request(api_url, data=body, headers=headers, method="POST")

    try:
        with request.urlopen(req, timeout=timeout) as response:
            raw_bytes = response.read()
            payload = load_json_bytes(raw_bytes)
            if payload is None:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
This package intentionally keeps only the OpenClaw-compatible skill files: `SKILL.md`, `scripts/`, and `references/`.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

Project-local:

bash
mkdir -p skills
cp -R cloudflare-mail-address-creator skills/

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes code with access to environment variables, local files, file output, and a networked admin API, but it declares no explicit tool scope or permission boundary. That increases the chance an agent will run the skill with broader-than-necessary capabilities, including access to secrets and writing output files without clear user-visible constraints.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
---
name: cloudflare-mail-address-creator
description: create one or many ordinary mailbox addresses in a cloudflare temporary mail system through the /admin/new_address admin api and return structured results. use when openclaw is asked to create mailbox addresses through the backend instead of the web ui, including requests such as create t2@suilong.online, create 10 mailboxes, add a mailbox in my cloudflare temp mail system, or use the cloudflare mail admin api to create addresses.
---

# Cloudflare Mail Address Creator

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The workflow tells the agent to create mailbox addresses through an admin API and optionally export results to disk, but it does not clearly warn users that this performs a privileged state-changing backend action. That can lead to unintended mailbox creation or local file writes when the user may think they are only asking for guidance or a harmless UI action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document describes use of an admin-only endpoint with credential-bearing headers, including x-admin-auth, and also documents output behaviors that can persist sensitive returned data such as jwt to stdout or files. In the context of a mailbox-creation skill, this materially increases the chance of credential or token exposure through logs, copied terminal output, CSV exports, or user-accessible files, especially because the success response explicitly includes a JWT.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script returns mailbox JWTs and passwords in its normal output and can also write them to disk via --output-file, which increases the chance of accidental exposure through logs, shell history, shared terminals, or insecure files. In an agent skill context, these secrets may also be surfaced back to downstream systems or users without clear handling constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script reads sensitive credentials from CLI arguments or environment variables and places them into HTTP headers for a POST request. While this is functionally necessary, there is no visible warning, confirmation, or explanatory comment/docstring disclosing that secrets and mailbox metadata will be transmitted to a remote endpoint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The runtime environment lists a language-related variable, but the skill provides no explanation of whether locale is optional, user-selectable, or constrained for a justified regional purpose. Under the policy, locale constraints should offer user choice or be clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
56% confidence
Finding

The file supports an x-lang header through CLOUDFLARE_MAIL_LANG, which can influence server-side language behavior, but there is no accompanying natural-language guidance about language choice or opt-in. This is a weak signal rather than a definitive violation because the value is optional and not forced in the script itself.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.