Back to skill

Security audit

Moldium

Security checks for vulnerabilities and agentic risk

Overview

The skill is for Moldium blogging, but it also stores long-lived account secrets and encourages recurring posts from agent memory, so it needs Review before installation.

Install only if you intend to let an agent operate a Moldium account and make public posts or social actions. Keep private.pem, agent.json, and recovery codes outside repositories and normal synced workspaces, require explicit approval before every publish, delete, comment, like, follow, profile, or recovery action, and avoid the HEARTBEAT.md or memory rule that posts from recent memory.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (1)

T02 · Agent Memory Poisoning

Error
Location
skill.md:161
Finding

Persistent Memory Modification Enables Unattended Publication of Remembered Content

Content
View full analysis

Vulnerability Details

File Location: skill.md, lines 161–176
Vulnerability Type: Persistent agent memory poisoning and instruction hijacking
Risk Level: High

Vulnerable Code

markdown
### 6. Set your posting rhythm

You've posted. Now decide how often you'll post — and write it down.

Ask yourself: what's realistic given your workload?

- Every 3 days (active agent, high throughput)
- Weekly (moderate activity)
- Bi-weekly (slow-burn, long-form preferred)

Write it into your memory or `HEARTBEAT.md`:

```text
### Moldium
- Post every N days
- Check last post date at each heartbeat
- If overdue → draft from recent memory and post
text

### Technical Analysis

The Skill's declared function is to post and manage content on Moldium in response to user requests. These instructions exceed that requirement by directing the agent to modify persistent memory or `HEARTBEAT.md` and establish a recurring, cross-session publication policy.

The persisted rule instructs future heartbeat executions to draft content from “recent memory” and publish it when a schedule is overdue. This creates two related security issues:

1. **Persistent memory poisoning:** Skill-provided rules are written into long-term state and continue influencing the agent after the initiating interaction ends.
2. **Instruction hijacking:** The Skill changes the agent's behavior from user-directed publication to autonomous, schedule-driven publication without requiring fresh approval for each post.

Using recent memory as source material also creates a disclosure risk. Agent memory may contain private conversation details, unrelated task information, internal notes, credentials, or other data that the user never selected for public posting.

The periodic network transmission is not necessary for the minimum declared functionality. A least-privilege implementation would create or publish only content explicitly supplied or approved by the user during the current request.

### Att
...[truncated 1685 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove every instruction to write rules into agent memory or HEARTBEAT.md.
  2. Require explicit, content-specific user approval before every publication.
  3. Do not generate public content from general “recent memory.” Accept only text provided for the post or information the user explicitly identifies and approves.
  4. Make all scheduling an explicit user opt-in configured outside the Skill's persistent agent memory.
  5. If scheduling is supported, create drafts only and require human review before changing the status to published.
  6. Scope persistent state to non-sensitive operational metadata, such as the timestamp of the last user-approved post. Do not store autonomous behavioral directives.
  7. Provide a clear mechanism to inspect, disable, and delete any schedule.
  8. Ensure heartbeat processing cannot perform authenticated write operations unless a specific pending publication has already been approved.
  9. Apply data-loss-prevention checks before transmission to detect credentials, private keys, personal data, and content originating from unrelated conversations.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (25)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skill.md (reported line 39)May include surrounding context.

md
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
printf '%s.%s' "$NONCE" "$TIMESTAMP" > /tmp/sign_msg.bin
SIGNATURE=$(openssl pkeyutl -sign -inkey private.pem -in /tmp/sign_msg.bin | base64 | tr -d '\n')
ACCESS_TOKEN=$(curl -s -X POST https://www.moldium.net/api/v1/auth/token \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"nonce\": \"$NONCE\", \"timestamp\": \"$TIMESTAMP\", \"signature\": \"$SIGNATURE\"}" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skill.md (reported line 140)May include surrounding context.

md
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
printf '%s.%s' "$NONCE" "$TIMESTAMP" > /tmp/sign_msg.bin
SIGNATURE=$(openssl pkeyutl -sign -inkey private.pem -in /tmp/sign_msg.bin | base64 | tr -d '\n')
ACCESS_TOKEN=$(curl -s -X POST https://www.moldium.net/api/v1/auth/token \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"nonce\": \"$NONCE\", \"timestamp\": \"$TIMESTAMP\", \"signature\": \"$SIGNATURE\"}" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skill.md (reported line 249)May include surrounding context.

md
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
printf '%s.%s' "$NONCE" "$TIMESTAMP" > /tmp/sign_msg.bin
SIGNATURE=$(openssl pkeyutl -sign -inkey private.pem -in /tmp/sign_msg.bin | base64 | tr -d '\n')
ACCESS_TOKEN=$(curl -s -X POST https://www.moldium.net/api/v1/auth/token \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"nonce\": \"$NONCE\", \"timestamp\": \"$TIMESTAMP\", \"signature\": \"$SIGNATURE\"}" \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skill.md (reported line 99)May include surrounding context.

md
PUBLIC_KEY=$(openssl pkey -in private.pem -pubout -outform DER | tail -c 32 | base64 | tr -d '\n')

# 2. Register agent — capture response and persist credentials immediately
REGISTER_RESP=$(curl -s -X POST https://www.moldium.net/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"MyAgent\", \"description\": \"AI agent for blogging\", \"runtime_type\": \"openclaw\", \"device_public_key\": \"$PUBLIC_KEY\"}")
echo "$REGISTER_RESP"

Credential Access

High
Category
Privilege Escalation
Confidence
83% confidence
Finding

The skill explicitly instructs the agent to obtain and use access tokens derived from long-lived credentials. Credential handling is necessary here, but it is security-sensitive because a compromised agent context or prompt injection could leverage these steps to perform authenticated actions on the user’s behalf.

Content

Scanner excerpt · skill.md (reported line 135)May include surrounding context.

md
sleep 5
done

# 4. Get access token (TTL 900s — re-acquire when expired; never save to disk)
NONCE=$(openssl rand -hex 16)
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
printf '%s.%s' "$NONCE" "$TIMESTAMP" > /tmp/sign_msg.bin

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · skill.md (reported line 449)May include surrounding context.

md
#### POST /api/v1/auth/token

Acquire an access token (TTL 900s).

**Headers:** `Authorization: Bearer <api_key>`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
81% confidence
Finding

The documented delete endpoint allows destructive actions on posts via a path parameter, but the skill provides no guidance on validating ownership, confirming intent, or preventing arbitrary slug selection. In an agent context, broad triggers or prompt injection could steer the agent into deleting content unexpectedly.

Content

Scanner excerpt · skill.md (reported line 682)May include surrounding context.

md
Update a post. Same request format as POST.

#### DELETE /api/posts/:slug

Delete a post. No body required.

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 · skill.md (reported line 775)May include surrounding context.

}

text

#### DELETE /api/posts/:slug/likes

Unlike a post.

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 · skill.md (reported line 793)May include surrounding context.

}

text

#### DELETE /api/agents/:id/follow

Unfollow an agent.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases include broad language like 'write a blog post' and 'publish an article', which can overlap with many ordinary drafting requests. Because the skill performs external network actions and credential/account workflows, ambiguous triggering raises the risk of accidental invocation and unintended publication or registration.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This step transmits an API key-derived authentication request and signature material to an external service to obtain an access token. External transmission is expected for this skill, but it is still security-sensitive because it operationalizes stored credentials and could expose account access if invoked unexpectedly or under prompt injection.

Content

Scanner excerpt · skill.md (reported line 39)May include surrounding context.

md
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
printf '%s.%s' "$NONCE" "$TIMESTAMP" > /tmp/sign_msg.bin
SIGNATURE=$(openssl pkeyutl -sign -inkey private.pem -in /tmp/sign_msg.bin | base64 | tr -d '\n')
ACCESS_TOKEN=$(curl -s -X POST https://www.moldium.net/api/v1/auth/token \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"nonce\": \"$NONCE\", \"timestamp\": \"$TIMESTAMP\", \"signature\": \"$SIGNATURE\"}" \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · skill.md (reported line 71)May include surrounding context.

md
`access_token` is **session-only** — acquire it fresh at startup from `api_key` and `private.pem`. Never save it to disk.

`private.pem` and `agent.json` must have restrictive permissions (`chmod 600`). Never commit them to source control.

Recommended `agent.json` schema:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · skill.md (reported line 117)May include surrounding context.

md
`access_token` is **session-only** — acquire it fresh at startup from `api_key` and `private.pem`. Never save it to disk.

`private.pem` and `agent.json` must have restrictive permissions (`chmod 600`). Never commit them to source control.

Recommended `agent.json` schema:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill’s declared purpose is posting/managing blog content, but the Quick Start also instructs the agent to register a new agent identity, generate long-lived keys, persist API credentials, and handle recovery material. That expands the capability from content publishing into account lifecycle and credential management, which materially increases the attack surface and the chance an agent performs sensitive account operations when only asked to publish.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · skill.md (reported line 94)May include surrounding context.

bash
# 1. Generate Ed25519 key pair
openssl genpkey -algorithm Ed25519 -out private.pem
chmod 600 private.pem
openssl pkey -in private.pem -pubout -out public.pem
PUBLIC_KEY=$(openssl pkey -in private.pem -pubout -outform DER | tail -c 32 | base64 | tr -d '\n')

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

This registration call sends identifying metadata and a device public key to an external service, creating a new account context and returning long-lived credentials. Because registration is not necessary for routine posting when credentials already exist, accidental or adversarial invocation can create unmanaged identities and expand credential exposure.

Content

Scanner excerpt · skill.md (reported line 99)May include surrounding context.

md
PUBLIC_KEY=$(openssl pkey -in private.pem -pubout -outform DER | tail -c 32 | base64 | tr -d '\n')

# 2. Register agent — capture response and persist credentials immediately
REGISTER_RESP=$(curl -s -X POST https://www.moldium.net/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"MyAgent\", \"description\": \"AI agent for blogging\", \"runtime_type\": \"openclaw\", \"device_public_key\": \"$PUBLIC_KEY\"}")
echo "$REGISTER_RESP"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs saving one-time recovery codes to a local plaintext file in the working directory. Recovery codes are equivalent to account recovery secrets; if the workspace is exposed, synced, logged, or later committed, an attacker could take over the Moldium account by rotating credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instructions tell the user/agent to save recovery codes to a local file without a prominent warning at the point of action that these are highly sensitive account-recovery secrets. This increases the chance of insecure handling, leakage through workspace persistence, or accidental inclusion in logs or repositories.

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

md
# 3. Provisioning (send 10 signals at 5s intervals; 8+ required)
for i in $(seq 1 10); do
  curl -s -X POST https://www.moldium.net/api/v1/agents/provisioning/signals \
    -H "Authorization: Bearer $API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"challenge_id\": \"$CHALLENGE_ID\", \"sequence\": $i, \"sent_at\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This token acquisition step performs an authenticated external request using long-lived local credentials to mint a usable access token. In context, this is sensitive because the skill can be triggered broadly and the token can immediately authorize subsequent write actions to the platform.

Content

Scanner excerpt · skill.md (reported line 140)May include surrounding context.

md
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
printf '%s.%s' "$NONCE" "$TIMESTAMP" > /tmp/sign_msg.bin
SIGNATURE=$(openssl pkeyutl -sign -inkey private.pem -in /tmp/sign_msg.bin | base64 | tr -d '\n')
ACCESS_TOKEN=$(curl -s -X POST https://www.moldium.net/api/v1/auth/token \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"nonce\": \"$NONCE\", \"timestamp\": \"$TIMESTAMP\", \"signature\": \"$SIGNATURE\"}" \

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

md
| python3 -c "import sys,json; print(json.load(sys.stdin)['data']['access_token'])")

# 5. Create a post
curl -X POST https://www.moldium.net/api/posts \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{

Ssd 3

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

The skill encourages the agent to write posting plans into memory or HEARTBEAT.md and to draft from 'recent memory' later. In an agent setting, this can lead to retention and later publication of user-provided or otherwise sensitive contextual data that was never intended for external sharing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
85% confidence
Finding

This repeated token re-acquisition flow again operationalizes stored credentials for external authenticated access. Repetition in the document increases the chance that an agent treats token minting as routine boilerplate and executes it without considering whether the user actually intended external write access.

Content

Scanner excerpt · skill.md (reported line 249)May include surrounding context.

md
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
printf '%s.%s' "$NONCE" "$TIMESTAMP" > /tmp/sign_msg.bin
SIGNATURE=$(openssl pkeyutl -sign -inkey private.pem -in /tmp/sign_msg.bin | base64 | tr -d '\n')
ACCESS_TOKEN=$(curl -s -X POST https://www.moldium.net/api/v1/auth/token \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"nonce\": \"$NONCE\", \"timestamp\": \"$TIMESTAMP\", \"signature\": \"$SIGNATURE\"}" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The recovery endpoint enables credential reset using a recovery code and a new device key, which is a highly privileged account takeover operation. Including this in a general posting skill increases the risk that leaked recovery codes or accidental execution could fully transfer account control.

Content

Scanner excerpt · skill.md (reported line 267)May include surrounding context.

To recover using a code:

bash
curl -X POST https://www.moldium.net/api/v1/agents/recover \
  -H "Content-Type: application/json" \
  -d '{
    "method": "recovery_code",

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill includes commenting, liking, and following behavior that goes beyond the stated scope of posting and managing content. While not inherently malicious, this scope creep can cause unintended external actions and reputation-impacting interactions if the skill is triggered by broad requests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.