Back to skill

Security audit

Readeck Save

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it sends a user-provided URL to the user's configured Readeck instance so the page can be saved for later reading.

Install only if you intend URLs to be sent to your configured Readeck server for fetching and processing. Use a minimally scoped Readeck token where possible, avoid saving sensitive internal or authenticated URLs unless you trust that Readeck instance, and consider fixing the script to JSON-encode the URL before posting it.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/save.sh:30
Finding

Unescaped URL Input Allows JSON Request-Body Injection

Content
View full analysis

Vulnerability Details

File Location: scripts/save.sh, lines 30–33
Vulnerability Type: Improper JSON construction using untrusted input
Risk Level: Medium

Vulnerable Code

bash
RESPONSE=$(curl -s -X POST "${READECK_URL}/api/bookmarks" \
  -H "Authorization: Bearer ${READECK_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d "{\"url\": \"$URL\"}")

Technical Analysis

The script directly interpolates the user-supplied $URL value into a JSON string without applying JSON encoding. A value containing quotation marks, backslashes, or control characters can escape the intended url string and alter the structure of the request body.

For example, an input resembling:

text
https://example.test/","title":"Injected

produces a request body resembling:

json
{"url": "https://example.test/","title":"Injected"}

This permits injection of additional JSON properties. Other crafted values can produce malformed JSON and cause request failure. The shell quotes around $URL prevent this flaw from directly becoming shell command injection; exploitation is confined to manipulation of the JSON sent to the configured Readeck API.

Attack Path

  1. An attacker supplies or influences the article URL passed to scripts/save.sh.
  2. The agent invokes the script with that crafted URL as its first argument.
  3. The script inserts the value directly into the JSON body without escaping it.
  4. The resulting request contains malformed JSON or attacker-added properties.
  5. The configured Readeck server processes any injected fields that its API recognizes, using the authority of READECK_API_TOKEN.

Impact Assessment

An attacker able to control the URL can manipulate the body of an authenticated bookmark-creation request. The practical effect depends on which additional fields the Readeck API accepts and may include alteration of bookmark attributes or denial of the reque ...[truncated 292 chars]

Remediation
View remediation

Remediation Suggestions

Construct the request body with a JSON-aware encoder rather than string interpolation:

bash
PAYLOAD=$(jq -n --arg url "$URL" '{url: $url}')

RESPONSE=$(curl -sS -X POST "${READECK_URL}/api/bookmarks" \
  -H "Authorization: Bearer ${READECK_API_TOKEN}" \
  -H "Content-Type: application/json" \
  --data-binary "$PAYLOAD")

Additionally:

  1. Validate that the supplied value is a well-formed URL.
  2. Restrict accepted schemes to those required by the workflow, normally http and https.
  3. Reject control characters and unexpected multiline input.
  4. Keep the API token scoped to the minimum Readeck permissions necessary to create bookmarks.
  5. Use curl -sS --fail-with-body and inspect the HTTP status code separately from the JSON response body so transport and server failures are handled reliably.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes a shell script but does not declare any tool scope or allowed tools, which weakens execution boundaries and makes it easier for an agent runtime to grant broader-than-necessary capabilities. In a security-sensitive environment, undeclared shell access increases the chance of unintended command execution paths or misuse beyond the narrow task of saving a URL.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill does not clearly warn that the provided URL will be sent to an external Readeck service, which then performs remote fetching and processing of the target content. This can expose private or sensitive URLs, internal endpoints, or user activity metadata to another system without sufficiently informed user consent.

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

sh
fi

# Make API request
RESPONSE=$(curl -s -X POST "${READECK_URL}/api/bookmarks" \
  -H "Authorization: Bearer ${READECK_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d "{\"url\": \"$URL\"}")

Static analysis

No suspicious patterns detected.