Back to skill

Security audit

RSS Reader

Security checks for vulnerabilities and agentic risk

Overview

This RSS reader mostly matches its stated purpose, but it fetches arbitrary feed URLs from the host environment without internal-network safeguards and prints remote feed text unsanitized.

Install only if you trust the feed URLs you will add and the environment does not expose sensitive localhost, private-network, or cloud metadata services to this process. Prefer adding URL validation, redirect limits, private-address blocking, response-size limits, and terminal-output sanitization before broad use or scheduled checks.

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/rss.js:41
Finding
Arbitrary Feed URLs Enable Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `scripts/rss.js:41-64`, with attacker-controlled input reaching the function at `scripts/rss.js:139` **Vulnerability Type**: Server-Side Request Forgery (SSRF) **Risk Level**: High ### Vulnerable Code ```javascript // Simple HTTP(S) fetch function fetchUrl(url) { return new Promise((resolve, reject) => { const client = url.startsWith('https') ? https : http; const req = client.get(url, { headers: { 'User-Agent': 'Clawdbot-RSS/1.0' }, timeout: 10000 }, (res) => { if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { // Follow redirect return fetchUrl(res.headers.location).then(resolve).catch(reject); } if (res.statusCode !== 200) { reject(new Error(`HTTP ${res.statusCode}`)); return; } let data = ''; res.on('data', chunk => data += chunk); res.on('end', () => resolve(data)); }); req.on('error', reject); req.on('timeout', () => { req.destroy(); reject(new Error('Request timeout')); }); }); } ``` The user-controlled URL reaches this function during feed validation: ```javascript const xml = await fetchUrl(url); ``` ### Technical Analysis The `add` command accepts a user-provided feed URL and passes it to `fetchUrl()` without validating its destination. Stored feed URLs are subsequently fetched by the `check` command as well. The implementation does not: - Reject loopback, private, link-local, or multicast IP addresses. - Prevent access to cloud instance metadata endpoints. - Resolve hostnames and validate all returned IP addresses. - Revalidate the destination after redirects. - Impose a maximum redirect count. - Restrict destinations to a trusted host allowlist. An attacker can therefore cause the process to issue HTTP requests to services reachable from the host running the Skill. A public URL can also redirect to an internal address, bypassing valid ...[truncated 2023 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse every input with `new URL()` and reject malformed URLs. 2. Allow only the exact `http:` and `https:` protocols. 3. Resolve the hostname before connecting and reject every address in prohibited ranges, including: - IPv4 and IPv6 loopback ranges. - RFC 1918 private IPv4 ranges. - IPv4 and IPv6 link-local ranges. - Unique-local IPv6 ranges. - Multicast, unspecified, reserved, and documentation ranges. 4. Repeat URL, hostname, and resolved-address validation after every redirect. 5. Limit redirects to a small fixed number, such as three to five. 6. Protect against DNS rebinding by connecting only to the validated resolved address while preserving the intended hostname for TLS and the `Host` header. 7. Consider an explicit allowlist of approved feed domains when arbitrary feed sources are unnecessary. 8. Enforce maximum response sizes and abort oversized downloads to reduce denial-of-service risk. 9. Apply outbound network restrictions at the container or operating-system level so the process cannot reach metadata services or sensitive internal networks. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rss.js:305
Finding
Untrusted Feed Content Is Emitted Without Terminal Control-Sequence Sanitization<![CDATA[ ## Vulnerability Details **File Location**: `scripts/rss.js:305-307` and `scripts/rss.js:329-335` **Vulnerability Type**: Terminal Escape-Sequence Injection **Risk Level**: Medium ### Vulnerable Code The default list output prints remote feed fields directly: ```javascript for (const item of items) { console.log(`[${item.category}] ${item.feedName} - "${item.title}" (${timeAgo(item.date)})`); if (item.link) console.log(` ${item.link}`); } ``` The ideas output similarly prints untrusted content without terminal sanitization: ```javascript for (const item of catItems.slice(0, 5)) { console.log(`- **"${item.title}"** - [${item.feedName}]`); if (item.description) { console.log(` ${item.description.slice(0, 200)}...`); } if (item.link) console.log(` ${item.link}`); console.log(); } ``` ### Technical Analysis Feed titles, item titles, descriptions, and links originate from remote XML documents. Although HTML tags and a small set of HTML entities are processed, the application does not remove ASCII control characters, ANSI escape sequences, or Operating System Command (OSC) sequences before writing these values to a terminal. A malicious feed can embed terminal control bytes in fields that are later passed to `console.log()`. Depending on the terminal emulator and its configuration, these sequences can: - Rewrite or conceal displayed output. - Change colors or cursor positions to spoof trusted messages. - Create deceptive clickable hyperlinks. - Change the terminal title. - Trigger clipboard operations through supported OSC sequences. The `--name` and `--category` command-line values can also be persisted and later displayed, although exploitation through remote feed content is the principal trust-boundary concern. ### Attack Path 1. The attacker hosts an RSS or Atom document containing ANSI or OSC control sequences in a title, description, or link. 2. The attacker convinces a user to add the feed, or compromises an already co ...[truncated 990 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Sanitize every untrusted string before terminal output, including feed names, categories, titles, descriptions, and links. 2. Remove ANSI CSI, OSC, DCS, APC, PM, and other terminal escape sequences using a well-maintained sanitizer. 3. Remove remaining non-printable C0 and C1 control characters, while optionally preserving necessary line breaks and tabs. 4. Validate output links and display their normalized `http:` or `https:` form. 5. Keep raw values only in machine-readable JSON output, where `JSON.stringify()` safely escapes control characters. 6. Add tests containing ANSI color codes, cursor movement, OSC hyperlinks, terminal-title changes, and clipboard sequences. 7. When output may be consumed by another parser or rendered as Markdown, apply escaping appropriate to that output context in addition to terminal sanitization. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (15)

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/rss.js add "https://example.com/feed.xml" --category tech
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Vague Triggers

Medium
Confidence
89% confidence
Finding
The manifest description and opening summary describe very broad usage such as monitoring 'any feed source' and using the skill for competitors, news, content ideas, or a personal aggregator, but they do not define specific activation phrases or exclusion conditions. In markdown/manifest context, this can make invocation criteria overly broad and increase the chance of unintended triggering from common research-related requests.

Missing User Warnings

Low
Confidence
86% confidence
Finding
This code writes feed configuration to a local file and makes outbound HTTP(S) requests to user-supplied feed URLs, but it does not disclose that URLs will be persisted under the data directory or that checking feeds transmits requests to remote servers. While these actions are central to an RSS reader, the file contains no explicit warning or notice about the persistence and network behavior.

Static analysis

No suspicious patterns detected.