Back to skill

Security audit

docker-mailbox

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because setup guidance uses a mutable Docker image and includes Cloudflare tunnel and DNS configuration beyond its stated mailbox-management purpose; the scan is partial, so the evidence is incomplete.

Consider whether you need the Cloudflare tunnel and webhook replay features, and whether Cloudflare handling mailbox API traffic is acceptable to you. The scan recommends avoiding installation until the Docker image is pinned to a verified immutable digest. Review with caution: the scanner completed most checks but marked coverage partial because two references could not be resolved.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
Findings (18)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The commands configure external networking infrastructure rather than operate a running mailbox through its declared API interfaces. Although potentially useful for deployment, creating tunnels and DNS routes and handling Cloudflare credentials materially exceed the described mailbox-management scope. The chunk does not itself start the tunnel or perform email operations.

Content

No source excerpt is available for this finding.

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 147)May include surrounding context.

"$MAILBOX_URL/mailboxes/personal/messages/1234?folder=INBOX"

text

`DELETE /mailboxes/<name>/messages/<uid>` moves the message to Trash with scope `organize`. Permanent deletion requires `?permanent=true`, scope `delete`, Trash as the source and UIDPLUS. Confirm the mailbox, folder and UIDs first. See [skill safety rules](../SKILL.md#permissions-and-safety).

More routes: `POST .../messages/labels` (`{uids, add, remove}`), `POST .../messages/move` (`{uids, to_folder}`), `POST .../folders` (`{name}`), `GET .../messages/<uid>/raw`, `GET .../messages/<uid>/attachments/<part_id>`, `GET .../messages/<uid>/thread`, `GET .../threads`, `GET .../identities`, `GET .../stats`. Fetching a message with `?headers=true&safe_html=true` also returns every header and a sanitized HTML body; `authentication` is included; `html_analysis` is included for HTML bodies. Backwards paging uses `cursor`/`next_cursor`; "new mail only" uses `since_cursor`/`next_since_cursor` or a named `checkpoint`.

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 · references/setup.md (reported line 15)May include surrounding context.

git clone https://github.com/psyb0t/docker-mailbox cd docker-mailbox cp config.example.yaml config.yaml cp .env.example .env chmod 600 config.yaml .env

Configure accounts in config.yaml and replace the placeholders in .env.

text

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 · references/setup.md (reported line 16)May include surrounding context.

cd docker-mailbox cp config.example.yaml config.yaml cp .env.example .env chmod 600 config.yaml .env

Configure accounts in config.yaml and replace the placeholders in .env.

text

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 · references/setup.md (reported line 24)May include surrounding context.

bash
# Plain docker run
docker run --rm --env-file .env -p 127.0.0.1:8000:8000 \
  -v "$PWD/config.yaml:/etc/mailboxd/config.yaml:ro" \
  -v mailboxd-state:/var/lib/mailboxd \
  psyb0t/mailbox:latest

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
------------------- |
| `mailbox`                                        | CSV filter by mailbox name (`personal`) **or** email address (`me@gmail.com`). Omit to search all IMAP mailboxes.                          |
| `from`, `to`, `subject`, `body`, `text`          | IMAP SEARCH predicates. `text` is full-text across headers + body.                                                                         |
| `since`, `before`                                | IMAP date filters, e.g. `1-Jan-2026`.                                                                                                      |
| `unseen`, `seen`, `flagged`, `answered`          | Boolean flag filters.                                                                                                                      |
| `larger_than`, `smaller_than`                    | Size filters in bytes.                                                                                                                     |
| `folde

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
mailboxes.                          |
| `from`, `to`, `subject`, `body`, `text`          | IMAP SEARCH predicates. `text` is full-text across headers + body.                                                                         |
| `since`, `before`                                | IMAP date filters, e.g. `1-Jan-2026`.                                                                                                      |
| `unseen`, `seen`, `flagged`, `answered`          | Boolean flag filters.                                                                                                                      |
| `larger_than`, `smaller_than`                    | Size filters in bytes.                                                                                                                     |
| `folder`                                         | IMAP folder name (default `INBOX`).

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
|
| `since`, `before`                                | IMAP date filters, e.g. `1-Jan-2026`.                                                                                                      |
| `unseen`, `seen`, `flagged`, `answered`          | Boolean flag filters.                                                                                                                      |
| `larger_than`, `smaller_than`                    | Size filters in bytes.                                                                                                                     |
| `folder`                                         | IMAP folder name (default `INBOX`).                                                                                                        |
| `limit`                                          | Results per mailbox, ≤ 500 (default 50); unified results can exceed this across accounts.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

| IMAP date filters, e.g. 1-Jan-2026. | | unseen, seen, flagged, answered | Boolean flag filters. | | larger_than, smaller_than | Size filters in bytes. | | folder | IMAP folder name (default INBOX). | | limit | Results per mailbox, ≤ 500 (default 50); unified results can exceed this across accounts. |

bash

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

| unseen, seen, flagged, answered | Boolean flag filters. | | larger_than, smaller_than | Size filters in bytes. | | folder | IMAP folder name (default INBOX). | | limit | Results per mailbox, ≤ 500 (default 50); unified results can exceed this across accounts. |

bash
# everything from one sender, all accounts

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 · references/api.md (reported line 80)May include surrounding context.

md
"$MAILBOX_URL/inbox?mailbox=personal,work&unseen=true" | jq

# everything since yesterday, full-text "invoice"
curl -s -H "Authorization: Bearer $MAILBOX_TOKEN" \
  "$MAILBOX_URL/inbox?since=$(date -d 'yesterday' +%-d-%b-%Y)&text=invoice" | jq

# search a specific folder (e.g. Spam)

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 · references/api.md (reported line 117)May include surrounding context.

bash
# Folders
curl -s -H "Authorization: Bearer $MAILBOX_TOKEN" \
  $MAILBOX_URL/mailboxes/personal/folders

# List newest-first headers. raw IMAP SEARCH criteria

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 · references/api.md (reported line 264)May include surrounding context.

"$MAILBOX_URL/inbox?from=newsletter@spam.io&limit=100" | jq -r '.messages[] | "(.mailbox) (.uid) (.subject)"'

2. Only after explicit confirmation of the specific UIDs: batch move to Trash

curl -s -X POST -H "Authorization: Bearer $MAILBOX_TOKEN" -H 'Content-Type: application/json'
-d '{"uids": ["101", "102"], "permanent": false}'
"$MAILBOX_URL/mailboxes/personal/messages/delete"

text

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 · references/api.md (reported line 276)May include surrounding context.

curl -s -H "Authorization: Bearer $MAILBOX_TOKEN" "$MAILBOX_URL/inbox?checkpoint=triage&limit=50" | jq '.messages[] | {mailbox, uid, from, subject}'

Then read one (headers, authentication, html_analysis included) and label it.

curl -s -H "Authorization: Bearer $MAILBOX_TOKEN" "$MAILBOX_URL/mailboxes/contact/messages/1234?safe_html=true" | jq '{authentication, html_analysis}' curl -s -X POST -H "Authorization: Bearer $MAILBOX_TOKEN" -H 'Content-Type: application/json'
-d '{"uids": ["1234"], "add": ["suspect"]}' "$MAILBOX_URL/mailboxes/contact/messages/labels"

text

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 · references/api.md (reported line 286)May include surrounding context.

md
MARKER="e2e-$(uuidgen | cut -c1-8)"

# 1. Send marker to self
curl -s -X POST -H "Authorization: Bearer $MAILBOX_TOKEN" \
  -H 'Content-Type: application/json' \
  -d "{\"to\": [\"me@gmail.com\"], \"subject\": \"ping $MARKER\", \"body_text\": \"$MARKER\"}" \
  "$MAILBOX_URL/mailboxes/personal/send"

Webhook replay introduces an administrative capability outside the stated mail-management purpose.

Medium
Category
Excessive Agency
Confidence
86% confidence
Finding

The skill documents a POST operation and MCP tool that replay webhook deliveries, also listed among admin-scoped tools at L228. Re-queuing integration events is an administrative action distinct from the manifest's stated reading, searching, organizing, drafting, replying, and sending of mail; user authorization and mailbox allowlisting restrict access but do not establish that purpose.

Content

No source excerpt is available for this finding.

Docker image referenced without tag or digest: 'docker run docker'.

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The scanner's matched text is inaccurate: the actual image reference is psyb0t/mailbox:latest, not an untagged image named docker. Nevertheless, latest is mutable, so a fresh pull can introduce an unreviewed or compromised image with access to mailbox credentials, bearer tokens, and email; read-only mounting does not prevent that image from reading credentials.

Content

No source excerpt is available for this finding.

Cloudflare Tunnel setup omits a warning about third-party access to mailbox API traffic.

Medium
Category
Output Handling
Confidence
89% confidence
Finding

The workflow instructs users to publish the mailbox API through Cloudflare Tunnel but does not explain that Cloudflare terminates public HTTPS and can process bearer tokens and mailbox data carried in API requests and responses. The authentication and credential-handling advice addresses access control, not this third-party privacy exposure.

Content

No source excerpt is available for this finding.