Back to skill

Security audit

url2pdf-mk

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed webpage archiving skill, but its default live-browser access and local CDP proxy can expose logged-in browser sessions and need careful review.

Install only if you genuinely need authenticated browser archiving. Prefer --isolated or HTTP mode, avoid running it with your real Chrome profile, use a disposable browser/VM for login-required pages, validate input URLs, and stop/clean the CDP proxy state after use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch_http.py:65
Finding

Private-Network and Cloud-Metadata SSRF Through Unvalidated Scraping URLs

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/cdp_proxy.py:370
Finding

CDP Proxy Authentication Token Disclosure and Unauthenticated Browser-Control Endpoints

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (68)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Running a local CDP proxy with HTTP endpoints for target management, background daemon behavior, temp state files, PID files, and auth tokens is a substantial hidden capability compared with a claimed conversion tool. Even if bound to localhost, such a proxy expands attack surface and can enable local abuse, session brokering, or persistence-like behavior if mishandled or left running.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Running a local CDP proxy with HTTP endpoints for target management, background daemon behavior, temp state files, PID files, and auth tokens is a substantial hidden capability compared with a claimed conversion tool. Even if bound to localhost, such a proxy expands attack surface and can enable local abuse, session brokering, or persistence-like behavior if mishandled or left running.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Running a local CDP proxy with HTTP endpoints for target management, background daemon behavior, temp state files, PID files, and auth tokens is a substantial hidden capability compared with a claimed conversion tool. Even if bound to localhost, such a proxy expands attack surface and can enable local abuse, session brokering, or persistence-like behavior if mishandled or left running.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Running a local CDP proxy with HTTP endpoints for target management, background daemon behavior, temp state files, PID files, and auth tokens is a substantial hidden capability compared with a claimed conversion tool. Even if bound to localhost, such a proxy expands attack surface and can enable local abuse, session brokering, or persistence-like behavior if mishandled or left running.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Running a local CDP proxy with HTTP endpoints for target management, background daemon behavior, temp state files, PID files, and auth tokens is a substantial hidden capability compared with a claimed conversion tool. Even if bound to localhost, such a proxy expands attack surface and can enable local abuse, session brokering, or persistence-like behavior if mishandled or left running.

Content

No source excerpt is available for this finding.

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Confidence
96% confidence
Finding

The skill explicitly states that default mode reuses the real Chrome profile and can access cookies and logged-in sessions. In context, this is not merely an informational false positive: a URL-conversion skill with browser-profile reuse and CDP control has information-stealer-like capability because it can access authenticated browser state unrelated to the user’s expectation of simple document export.

Content

Scanner excerpt · SKILL.md (reported line 228)May include surrounding context.

md
e | Public content / 公开内容 |
| **Default / 默认** | `main.py <URL>` | Reuse Chrome real Profile / 复用 Chrome 真实 Profile | WeChat articles requiring login / 需登录态的微信文章 |

### 风险与缓解 | Risks & Mitigations

| Risk / 风险项 | Description / 说明 | Mitigation / 缓解措施 |
|--------|------|----------|
| Profile reuse / Profile 复用 | Can access Chrome cookies/login sessions / 可访问 Chrome Cookie/登录态 | ✅ Always use `--isolated` for public content / 公开内容一律用 `--isolated` |
| CDP remote debugging / CDP 远程调试 | Enables Chrome DevTools protocol / 开启 Chrome DevTools 协议 | Only listens on `127.0.0.1:9222~9232` (localhost) / 仅监听本机 |
| CDP Proxy | Creates local proxy daemon / 创建本地代理守护进程 | Only bound to `127.0.0.1`, external access blocked / 仅绑定本机;WS 需 Token 验证 |
| Browser launch / 浏览器启动 | May reuse existing browser window / 可能复用已有浏览器窗

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module exposes arbitrary JavaScript execution through both the evaluate() method and the CLI eval subcommand, which goes well beyond a URL-to-PDF/Markdown archival purpose. In the stated context, browser mode may reuse a real Chrome profile, so arbitrary page-context JS can interact with authenticated sessions, inspect page data, and trigger privileged actions on sites the user is logged into.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

get_cookies() provides direct access to browser cookies, a sensitive credential source unrelated to ordinary webpage-to-PDF conversion. Because the skill explicitly warns that default browser mode reuses the user's Chrome profile, this capability could expose authenticated session tokens and materially increase account compromise risk.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/main.py (reported line 26)May include surrounding context.

python
SKILL_DIR = os.path.dirname(os.path.abspath(__file__))

# 调用子脚本时注入环境变量(强制入口检查)
ENV_MAIN = {**os.environ, 'URL2PDFMK_ENTRY': 'main'}

# ══════════════════════════════════════════════════════════════
# 0. 检测 Chrome 是否可用

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill requests or implies broad capabilities including environment access, file read/write, network, and shell execution, but does not declare an explicit tool scope. That makes the effective privilege boundary opaque to users and reviewers, increasing the chance of unintended high-privilege execution paths for a skill that drives a browser, touches temp files, and writes output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation description includes broad phrases such as "网页保存" and "保存链接," which can easily occur in ordinary conversation and are not specific to this skill's exact behavior. The trigger list also ends with "等时触发此技能," making the invocation scope open-ended rather than tightly constrained.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 255)May include surrounding context.

md
4. **CDP Port Security / CDP 端口安全**: CDP debugging ports are bound to `127.0.0.1` only, external network cannot access. WebSocket connections require Token verification.

5. **Don't Run as Root / 不要以 root 运行**: Run with normal user privileges recommended / 建议以普通用户权限运行此工具。

6. **VM / Sandbox / 虚拟机 / 沙箱**: If you must run browser mode with your real profile, do so inside a VM or disposable environment to limit exposure.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring states it generates Markdown files and that PDF must be produced manually in a browser, and the implementation only writes a .md file. This is materially narrower than the manifest's promise of converting URLs into offline-readable PDF and Markdown files automatically.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file implements broad browser automation primitives including click, keypress, fill, select, tab control, scrolling, and DOM-triggered interaction. While such capabilities can be useful in scraping or rendering difficult pages, they also enable full session automation on authenticated websites, which is materially broader than simple archival and becomes more dangerous given Chrome-profile reuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The arbitrary JS execution feature is not just powerful but also insufficiently disclosed within the code path itself, despite enabling execution in the context of visited pages. In this skill, lack of in-product warning is significant because users may reasonably expect document conversion, not page-side code execution against live logged-in sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Cookie access is implemented as a callable helper without any user-facing prompt, consent flow, or runtime warning. In a tool whose advertised purpose is webpage conversion, undisclosed access to session cookies creates a transparency and trust violation with real security consequences if the capability is exposed upstream.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This Python file contains extensive natural-language documentation and runtime prompts in Chinese, including the module docstring and many printed guidance/error messages. Because the file does not offer a locale selection, fallback language, or explicit justification for a China-specific audience, it violates the language/locale policy for natural-language behavior.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 148)May include surrounding context.

python
pattern = exe_patterns.get(browser)
        if pattern:
            try:
                result = subprocess.run(
                    ['pgrep', '-f', pattern],
                    capture_output=True, text=True, timeout=5,
                )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 169)May include surrounding context.

python
exe = exe_names.get(browser)
        if exe:
            try:
                result = subprocess.run(
                    ['tasklist', '/FI', f'IMAGENAME eq {exe}', '/FO', 'CSV', '/NH'],
                    capture_output=True, text=True, timeout=5,
                )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 191)May include surrounding context.

python
}
        for p in patterns.get(browser, []):
            try:
                result = subprocess.run(
                    ['pgrep', '-f', p],
                    capture_output=True, text=True, timeout=5,
                )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 230)May include surrounding context.

python
try:
        if SYSTEM in ('Darwin', 'Linux'):
            # lsof -iTCP:9222 -sTCP:LISTEN -nP -t  → prints PIDs only
            result = subprocess.run(
                ['lsof', f'-iTCP:{port}', '-sTCP:LISTEN', '-nP', '-t'],
                capture_output=True, text=True, timeout=3,
            )

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 263)May include surrounding context.

python
f'-ErrorAction SilentlyContinue | '
            f'Select-Object -First 1 -ExpandProperty OwningProcess'
        )
        result = subprocess.run(
            ['powershell', '-NoProfile', '-NonInteractive',
             '-Command', ps_cmd],
            capture_output=True, text=True, timeout=5,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 362)May include surrounding context.

python
f'-ErrorAction SilentlyContinue | '
            f'Select-Object -First 1 -ExpandProperty OwningProcess'
        )
        result = subprocess.run(
            ['powershell', '-NoProfile', '-NonInteractive',
             '-Command', ps_cmd],
            capture_output=True, text=True, timeout=5,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 278)May include surrounding context.

python
# --- Strategy 2: netstat -ano (fallback) ---
    try:
        result = subprocess.run(
            ['netstat', '-ano'],
            capture_output=True, text=True, timeout=5,
            creationflags=getattr(subprocess, 'CREATE_NO_WINDOW', 0),

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/browser_launcher.py (reported line 321)May include surrounding context.

python
try:
        if SYSTEM == 'Darwin':
            result = subprocess.run(
                ['ps', '-p', str(pid), '-o', 'command='],
                capture_output=True, text=True, timeout=3,
            )