T09 · Insecure Skill Coding Practices
- Location
markdown-clip.js:74- Finding
Shell Command Injection Through a User-Controlled URL in Smart Extraction Mode
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a real content and video capture tool, but it has confirmed command-injection paths and under-disclosed media/key-handling behavior that make it unsafe to install without review.
Install only if you are prepared to audit or patch it first. At minimum, replace shell-based execSync calls with argument-array APIs, sandbox runs, avoid untrusted webpages and media URLs, review the legality of media downloads, and disable or remove key capture, Cookie header rewriting, and page-to-background pass-through unless you explicitly need them.
markdown-clip.js:74Shell Command Injection Through a User-Controlled URL in Smart Extraction Mode
content-extractor.js:408Shell Command Injection Through Extracted Webpage Content During Translation
markdown-clip.js:23Shell Command Injection Through Page-Title-Derived Paths in Article Analysis
content-extractor.js:365Shell Command Injection Through Page-Title-Derived Paths During PDF Export
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
AES/HLS key retrieval, TS segment downloading/merging, live recording, transcoding handoff, and external downloader invocation substantially increase the skill's ability to acquire and process protected media. In this context, these undeclared capabilities are dangerous because they facilitate bulk media extraction and potentially circumvention-oriented workflows not obvious from a generic content-capture description.
The script listens for page messages carrying media/decryption keys, converts them, stores them, and forwards them to extension components and local handling. Collecting and exporting such keys is highly sensitive because it can facilitate unauthorized decryption, redistribution, or circumvention of protected media workflows.
The catCatchToBackground path relays arbitrary page-supplied message objects directly to the extension background after only deleting the action field. This creates a confused-deputy bridge from untrusted web pages into privileged extension logic, potentially enabling unauthorized privileged actions depending on background handlers.
setHeaders provides privileged request-header rewriting for arbitrary URL filters and can inject Cookie headers directly into requests. This enables request forgery/impersonation against target sites and can bypass normal browser-originated header controls, which is especially dangerous in an extension that captures web resources.
Untrusted data from another tab message, result.mediaInfo, is inserted into the DOM using .html(), enabling DOM-based XSS in the extension page if that content contains markup or script gadgets. Because extension pages often have elevated privileges, successful injection can have more severe consequences than ordinary web-page XSS.
chrome.tabs.sendMessage(getId, "getM3u8", function (result) {
$("#m3u8Text").val(result.m3u8Content);
$("#parse").click();
$("#info").html(result.mediaInfo);
});
}
} else {
The code explicitly fetches HLS key URIs, stores the raw 16-byte decryption keys, and renders them in hex/base64 in the UI. It also enumerates possible keys from page frames, which materially expands the tool from content downloading into DRM/key extraction and exposes sensitive cryptographic material to the user.
This logic collects candidate keys, decrypts a sample fragment with each, and checks magic bytes to discover a working 'real' key. That is an active key-recovery workflow designed to bypass protected media access controls, not merely to process user-provided media.
The skill advertises and invokes shell, network, file read/write, and likely environment-dependent tooling, but the manifest declares no explicit tool scope or permission boundaries. In an agent setting, this increases the chance of over-privileged execution, unexpected external access, and unsafe file or network operations without user-visible constraints.
The trigger phrases are broad terms like webpage capture, content extraction, and video download, with no activation constraints or user-confirmation requirements. In an agent ecosystem, this can cause the skill to auto-activate in situations where the user did not intend network fetches, downloads, monitoring, or file generation, increasing the chance of privacy-impacting or overbroad actions.
The documentation promotes video downloading, content extraction, PDF export, and page monitoring but does not warn users about privacy implications, bandwidth use, local storage, or retained monitored content. Because the skill interacts with external pages and can generate persistent outputs or ongoing monitoring, missing warnings reduce informed consent and increase the risk of unsafe use.
The file-level docstring states this module performs automatic article analysis, including summaries, insights, tags, and reader targeting, and the code implements only local markdown text analysis. This does not match the skill manifest's advertised scope of web grabbing, Markdown/PDF/multimodal extraction, translation, and video download, indicating a semantic mismatch between claimed skill purpose and actual implemented behavior in this file.
This Python skill includes its primary natural-language documentation and user-facing description exclusively in Chinese, which imposes a language constraint on users without any opt-in or alternative. The policy explicitly calls for flagging language or locale requirements when the skill forces a specific language without user choice.
The argparse description and help text shown to end users are hardcoded in Chinese, which effectively forces a specific language for interacting with the tool. There is no visible opt-in, locale switch, or documented justification for restricting the interface language.
The script hard-codes locale: 'zh-CN' and timezoneId: 'Asia/Shanghai' for every browsing session. This is a natural-language/locale policy concern because it imposes a specific locale on all users and target sites without offering a choice or documenting a justified regional constraint.
The content script exposes broad media-control, download, extraction, and processing capabilities through message handlers in a page context, exceeding a narrowly described content-extraction role. While some features may be intended for a media downloader, the breadth of control increases abuse potential if another extension component, compromised page bridge, or weak sender validation can invoke them.
The screenshot handler captures the current video frame, converts it to a JPEG, and immediately triggers a file download via a synthetic link click. In this file there is no confirmation prompt, user-visible notice, or explanatory comment warning that invoking this action will write a file to the user's system.
The ffmpeg workflow can fetch arbitrary remote data or process provided blobs and then post the results into the page/extension workflow without visible disclosure or tight validation. In combination with the message bridge patterns in this file, this expands the data-movement surface and can be abused for unexpected network access or content processing.
The getPage handler can return the full page HTML or arbitrary selected DOM content to extension components with no user-facing notice. On pages containing tokens, personal data, or proprietary content, this enables silent extraction beyond what users may expect from a media/content tool.
Detected: suspicious.dangerous_exec