Back to skill

Security audit

Obsidian Daily Note

Security checks for vulnerabilities and agentic risk

Overview

The skill is a plausible Obsidian note writer, but it has unclear trigger rules and automatically fetches user-supplied URLs, which can expose private links or internal services.

Review before installing. Use it only if you are comfortable with it creating and prepending to local Obsidian files and saving a vault path under ~/.workbuddy. Avoid pasting sensitive or internal URLs unless the skill is changed to store links as-is by default or ask before fetching titles.

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
SKILL.md:112
Finding

Unrestricted Fetching of User-Supplied URLs

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 112–120 and 141–142
Vulnerability Type: Server-Side Request Forgery (SSRF) through unrestricted URL fetching
Risk Level: Medium

Vulnerable Code:

markdown
## URL Handling

When the user provides URLs in their note content:

1. **Attempt title extraction**: Try to fetch the page with WebFetch and
   extract the `<title>` tag.
2. **On success**: Write the extracted title next to the link, e.g.:
   `[页面标题](URL)`
3. **On failure** (internal pages, login walls, timeouts): Keep the link as-is
   along with whatever description the user provided. Do NOT retry or
   over-engineer.
4. **Self-contained note**: Each URL entry should include enough context for
   the user to understand what the link is about later, without relying on
   the page being accessible.
markdown
6. **Handle URLs**: For any URLs in the content, try WebFetch to extract
   the page title. If it fails silently, keep the link + description.

Technical Analysis

The skill directs the agent to pass every URL found in user-supplied note content to WebFetch. It does not restrict URL schemes or destinations, validate resolved IP addresses, control redirects, or prohibit requests to loopback, private, link-local, reserved, or cloud metadata addresses. Its explicit reference to failures involving “internal pages” indicates that attempts to reach internal resources are anticipated rather than blocked.

This creates an SSRF-style request primitive in environments where WebFetch can access destinations unavailable to the user. An attacker could submit a direct internal URL or use an external URL that redirects to an internal destination. DNS rebinding may also bypass validation if destination checks are not repeated when the connection is established.

The fetched page title is incorporated into the note on success. Consequently, response data present in an internal page's <title> element could be disclosed throu ...[truncated 1973 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not fetch URLs automatically. Require explicit confirmation before retrieving a page title, or leave URLs unchanged by default.
  2. Permit only normalized https URLs. Reject non-HTTP schemes, embedded credentials, malformed URLs, ambiguous numeric IP representations, and protocol-relative URLs.
  3. Resolve the hostname before making a request and reject every address in loopback, private, link-local, multicast, unspecified, documentation, carrier-grade NAT, and other reserved ranges for both IPv4 and IPv6.
  4. Pin the validated address during connection establishment to mitigate DNS rebinding and verify that the connected address matches an approved resolution result.
  5. Disable redirects or validate the scheme, hostname, resolved addresses, and connected address again at every redirect hop. Enforce a small redirect limit.
  6. Block cloud metadata hosts and addresses explicitly, including link-local metadata endpoints and provider-specific aliases.
  7. Apply strict connection and response timeouts, response-size limits, content-type restrictions, and download limits. Retrieve only the minimum content required to identify a title.
  8. Run fetching in a sandbox with no access to loopback or private networks and with restrictive outbound firewall rules.
  9. Treat extracted titles as untrusted text and safely encode them before inserting them into Markdown.
  10. If any destination cannot be validated conclusively, skip title extraction and preserve the original URL verbatim.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

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: obsidian-daily-note
description: "Write structured entries into an Obsidian daily note vault. Use when the user sends text, links, or content to be recorded, including research notes, task summaries, ideas, URLs, or meeting takeaways. Triggered by phrases like 记一下, 写入笔记, 记录, 帮我记, 写进obsidian, or when the user pastes URLs. On first use, guides setup of the Obsidian vault path."
agent_created: true
---

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description at L003 says the skill is triggered by generic phrases like '记一下', '记录', and '帮我记', but the later trigger rules at L049-L058 explicitly state the skill should only activate on explicit Obsidian-directed phrases and must not auto-trigger on ambiguous expressions like '记一下' or '记录'. This is an active contradiction in the skill's own documentation about when writing should occur.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill persistently writes notes, creates directories, and copies attachments into the local filesystem, but it does not require a clear user-facing warning at write time. This can lead to unintentional data persistence or filesystem modification, especially because the skill handles arbitrary user-supplied content and may auto-create files and folders.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill says user content must be written verbatim, but later instructs the agent to fetch URLs and replace them with titled markdown links. That contradiction can cause the system to alter user-provided content unexpectedly and may introduce network access based on pasted text, violating user expectations and potentially causing sensitive URLs to be dereferenced.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Automatically fetching pasted URLs can leak private or internal links to external services or trigger requests to sensitive endpoints without the user's awareness. In a note-taking context, users may paste intranet, pre-authenticated, or confidential URLs, so implicit network access materially increases privacy and security risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.