Back to skill

Security audit

gb-citation

Security checks for vulnerabilities and agentic risk

Overview

This skill is a GB/T 7714 citation formatter with expected image, citation-text, and webpage parsing, but users should be aware it may activate broadly on images and fetch cited webpages.

Install this if you want help formatting GB/T 7714-2015 references. Use it with citation screenshots, citation text, or public URLs you intend the agent to fetch; avoid giving it private/internal links or sensitive images unless you are comfortable with the agent processing them.

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:67
Finding

Unrestricted Fetching of User-Controlled URLs

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 16-17 and 67-75
Vulnerability Type: Server-Side Request Forgery (SSRF) and indirect prompt-injection exposure
Risk Level: Medium

Vulnerable code:

markdown
- User message contains a URL/web link AND asks for citation
markdown
#### For Web Links

Fetch the webpage content. Extract:
1. **Authors** — From byline, meta tags, or page content
2. **Title** — From `<title>` tag or page heading
3. **Website name** — Domain or site name
4. **Date** — Publication date (YYYY-MM-DD or YYYY-MM or YYYY)
5. **URL** — Full URL
6. **Access date** — Today's date in YYYY-MM-DD

Technical Analysis

The skill instructs the agent to fetch arbitrary URLs supplied by users without defining restrictions on URL schemes, destinations, DNS resolution, redirects, or network ranges. It does not prohibit requests to loopback, private, link-local, reserved, or cloud metadata addresses.

Consequently, if the underlying web-fetching tool can access such destinations, the agent may act as an SSRF proxy. Redirects or DNS rebinding could potentially bypass a check performed only on the original URL. The instructions also do not establish a trust boundary for retrieved content. A malicious webpage could contain instructions crafted to manipulate the agent rather than bibliographic data, creating indirect prompt-injection exposure.

Attack Path

  1. An attacker supplies a citation request containing an internal, loopback, link-local, cloud metadata, or attacker-controlled URL.
  2. The URL and citation request satisfy the skill's activation condition.
  3. Following the workflow, the agent fetches the supplied address.
  4. If network controls permit access, the request reaches a resource unavailable directly to the attacker.
  5. Response data may be processed and returned as citation fields, potentially disclosing internal information.
  6. Alternatively, an att ...[truncated 960 chars]
Remediation
View remediation

Remediation Suggestions

  1. Accept only absolute https:// URLs and reject all other schemes, including file:, ftp:, data:, and custom schemes.
  2. Resolve the hostname before making the request and reject loopback, private, link-local, multicast, reserved, and unspecified IP ranges for both IPv4 and IPv6.
  3. Explicitly block cloud metadata destinations, including link-local metadata addresses and provider-specific metadata hostnames.
  4. Revalidate the destination after every redirect and limit the number of redirects.
  5. Defend against DNS rebinding by connecting only to the validated resolved address and verifying the destination throughout the request.
  6. Apply strict connection and read timeouts, response-size limits, MIME-type restrictions, and download limits.
  7. Use a sandboxed fetch service with no access to internal networks, local files, ambient credentials, or authenticated browser sessions.
  8. Add an instruction that retrieved webpage content and metadata are untrusted data. They must only be parsed for bibliographic fields and must never be followed as agent instructions.
  9. Prefer extracting standardized metadata such as JSON-LD, Open Graph, Dublin Core, or citation meta tags rather than processing unrestricted page text.
  10. Return a safe validation error when a URL violates these controls.
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 (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger activates on any message containing an image, regardless of whether the user asked for citation help. This can cause unintended skill invocation on unrelated images, increasing the chance of inappropriate processing of sensitive content and violating user expectations about when the skill should run.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The citation-conversion condition is broad enough to match many citation-like messages even without an explicit trigger phrase. This can lead to the skill taking over normal conversations or transforming user content without clear consent, which is a safety and routing issue in agent environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to fetch arbitrary user-provided URLs without disclosing network access or applying visible restrictions. In an agent setting, this can enable unintended outbound requests, access to internal resources, or retrieval of sensitive content, creating SSRF-like and privacy risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This markdown guidance contains a natural-language formatting policy that mandates a specific language/locale style for English names ('Surname ALL CAPS'). Under the policy-violation rule, forced language/locale conventions without user opt-in or clear justification can be flagged, and this file does not explain why this constraint must apply in all cases.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.