Back to skill

Security audit

CCTV News Fetcher

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear news-fetching purpose, but its crawler follows unvalidated links from remote pages and sends a hard-coded cookie, so users should review it before installing.

Install only if you are comfortable with the skill running a local JavaScript crawler that makes outbound web requests. Prefer a version that allowlists CCTV hosts, rejects non-HTTPS or unexpected links, removes the hard-coded cookie and Host header, and adds request limits before use in sensitive networks.

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/news_crawler.js:112
Finding

Unvalidated server-directed requests with unnecessary cookie forwarding

Content
View full analysis
a.getAttribute('href') || ''); const headers = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', 'Cache-Control': 'no-cache', 'Cookie': 'cna=DLYSGBDthG4CAbRVCNxSxGT6', 'Host': 'tv.cctv.com', 'Pragma': 'no-cache', 'Proxy-Connection': 'keep-alive', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36' }; const data = await Promise.all(pageUrls.map(async pageUrl => { try { const pageResponse = await fetch(pageUrl, { headers }); const pageText = await pageResponse.text(); const soup = parse(pageText); const title = soup.querySelector('h3')?.text.replace('[视频]', '').trim() || soup.querySelector('.tit')?.text.trim() || ''; const content = soup.querySelector('.cnt_bd')?.text.replace(/\n/g, ' ').trim() || soup.querySelector('.content_area')?.text.trim() || ''; return { date, title, content }; } catch (err) { console.error(`Error fetching page ${pageUrl}:`, err.message); return null; } })); ``` Equivalent unsafe URL extraction and request behavior also appears in `fetchOlderNews` at lines 9-44 and `fetchMidNews` at lines 62-97. ### Technical Analysis The crawler extracts article URLs from remotely supplied CCTV HTML and passes them directly to `fetch()` without validating their scheme, hostname, port, resolved address, or redirect destination. A compromised or manipu ...[truncated 2339 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to execute a local JavaScript crawler that performs network access, but the manifest declares no explicit tool scope such as permissions or allowed-tools. This creates a least-privilege and governance gap: the skill can cause external network activity without an auditable declaration, making review, sandboxing, and policy enforcement weaker.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The example prompt is presented only in Chinese, and the file does not state that language selection is optional or user-controlled. This can indicate a locale/language policy issue because the skill appears to assume a specific language without documenting user opt-in or a region-specific justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The crawler extracts URLs from remote page content and fetches them without validating scheme, hostname, or path. If the source page is compromised or unexpectedly includes third-party links, the script can be induced to make outbound requests beyond the intended CCTV-only scope, creating SSRF-like network expansion and data collection from unintended hosts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code follows href values parsed from HTML and requests them directly with no host validation. That allows untrusted page content to expand network access to arbitrary destinations if the upstream page contains malicious, injected, or malformed links.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The recent-news crawler scrapes links from a broad selector and fetches each target without constraining the destination host. In a skill whose stated purpose is only fetching CCTV news, unrestricted follow-up requests make the behavior more dangerous because external content can drive additional outbound traffic to arbitrary sites.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency is specified with a caret range (^7.0.2), which allows automatic installation of newer minor and patch releases. This can introduce supply-chain risk if a later allowed version is compromised or contains a breaking security issue, and it also reduces build reproducibility. In this skill's context, the package is used for HTML parsing in a network-fetching tool, so dependency integrity matters, though the issue is not by itself evidence of malicious behavior.

Content

Scanner excerpt · package.json (reported line 7)May include surrounding context.

json
"description": "Fetch news from CCTV",
    "main": "scripts/news_crawler.js",
    "dependencies": {
        "node-html-parser": "^7.0.2"
    }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The request headers explicitly set Accept-Language to 'zh-CN,zh;q=0.9,en;q=0.8', which imposes a locale preference in code rather than letting the user or runtime choose. The same pattern appears in the other header blocks as well, indicating the skill consistently forces a specific language context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The request headers explicitly set Accept-Language to 'zh-CN,zh;q=0.9,en;q=0.8', which imposes a locale preference in code rather than letting the user or runtime choose. The same pattern appears in the other header blocks as well, indicating the skill consistently forces a specific language context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The request headers explicitly set Accept-Language to 'zh-CN,zh;q=0.9,en;q=0.8', which imposes a locale preference in code rather than letting the user or runtime choose. The same pattern appears in the other header blocks as well, indicating the skill consistently forces a specific language context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.