Back to skill

Security audit

NapCat QQ Bridge Installer

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real QQ bridge installer, but it exposes unauthenticated local/network services that can read logs/configuration and send QQ messages.

Review carefully before installing. This skill should only be used on a controlled Windows machine, preferably isolated from untrusted networks, and only after you are comfortable with it installing software, starting services, storing QQ chat logs, invoking OpenClaw from QQ messages, and exposing management/message-sending endpoints unless the artifact is hardened first.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (7)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
assets/runtime/bridge.mjs:469
Finding

Unauthenticated Bridge Management API Exposes Secrets, Logs, Configuration, and Message-Sending Capabilities

Content
View full analysis
{ try { res.json(readdirSync(LOG_DIR).filter(name => name.endsWith('.log')).sort()); } catch { res.json([]); } }); app.get('/logs/:filename', (req, res) => { const path = resolve(LOG_DIR, req.params.filename); if (!existsSync(path)) { res.status(404).send('not found'); return; } res.type('text/plain; charset=utf-8').send(readFileSync(path, 'utf-8')); }); app.get('/config', (_req, res) => { res.json(config); }); app.post('/config', (req, res) => { config = deepMerge(config, req.body || {}); saveConfig(config); res.json({ ok: true, config }); }); app.post('/send_qq', async (req, res) => { const { type, target, message } = req.body || {}; if (!type || !target || !message) { res.status(400).json({ error: 'need type, target, message' }); return; } try { const data = await sendQQMessage(type, target, message, true); res.json({ ok: true, data }); } catch (error) { res.status(502).json({ ok: false, error: error.message }); } }); app.listen(Number(config.bridge.httpPort || 3002), () => { console.log(`[bridge] HTTP listening on ${config.bridge.httpPort || 3002}`); }); ``` ### Technical Analysis The Express application does not authenticate or authorize any management endpoint. Because `app.listen()` does not specify a loopback address, Node.js ordinarily listens on all available interfaces. The exposed endpoints provide security-sensitive capabilities: - `/logs` and `/logs/:filename` disclose stored QQ conversations. - `/config` returns the complete runtime configuration, including the NapCat API bearer token and QQ identifiers. - `POST /config` permits arbitrary configuration changes. - `POST /send_qq` sends ...[truncated 1208 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
assets/runtime/bridge.mjs:200
Finding

Unauthenticated Configuration Changes Can Redirect and Exfiltrate the NapCat Bearer Token

Content
View full analysis
({})); if (!response.ok) throw new Error(`NapCat ${response.status}`); return data; } ``` ```javascript const response = await fetch(`${config.napcat.apiUrl}/${apiPath}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${config.napcat.apiToken}`, }, body: JSON.stringify(body), }); ``` ```javascript app.post('/config', (req, res) => { config = deepMerge(config, req.body || {}); saveConfig(config); res.json({ ok: true, config }); }); ``` ### Technical Analysis The unauthenticated configuration endpoint accepts arbitrary nested values and persistently merges them into the active configuration. An attacker can replace `napcat.apiUrl` with an external URL under their control. Status, typing-indicator, and message-sending operations subsequently attach the real NapCat token to requests through the `Authorization: Bearer` header. No origin allowlist or loopback validation prevents the token from being sent to a remote host. Normal communication with a local NapCat API is necessary for the declared functionality. Permitting an unauthenticated caller to redirect token-bearing requests is not necessary and violates least privilege. ### Attack Path 1. The attacker sends an unauthenticated request to `POST /config`. 2. The request sets `napcat.apiUrl` to an attacker-controlled HTTP or HTTPS endpoint. 3. T ...[truncated 684 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
assets/runtime/bridge.mjs:235
Finding

Untrusted QQ Content Is Passed Directly to a Potentially Tool-Capable OpenClaw Agent

Content
View full analysis
seg.type === 'at' && String(seg.data?.qq) === String(selfId)); const isPrivate = !event.group_id; if (!isPrivate && !isAtBot) return; const recentCtx = getRecentContext(key); const contex ...[truncated 2041 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/manage.py:407
Finding

Generated OneBot Services Listen on All Interfaces Without Authentication

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/runtime/bridge.mjs:117
Finding

QQ Conversations Are Persistently Logged in Plaintext and Exposed Beyond Bot-Directed Messages

Content
View full analysis
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/manage.py:220
Finding

Mutable External Executables and Packages Are Downloaded and Executed Without Integrity Verification

Content
View full analysis
dict: napcat_home = root / "napcat" release = fetch_release_payload(DEFAULT_NAPCAT_RELEASE_API) asset = choose_napcat_asset(release, asset_name) with tempfile.TemporaryDirectory(prefix="napcat-skill-") as temp_dir: temp_root = Path(temp_dir) archive_path = temp_root / asset["name"] extract_root = temp_root / "extract" print(f"Downloading {asset['name']} from {asset['browser_download_url']}") download_file(asset["browser_download_url"], archive_path) with zipfile.ZipFile(archive_path) as zip_handle: zip_handle.extractall(extract_root) runtime_root = locate_runtime_root(extract_root) if force and napcat_home.exists(): for stale in ("bridge.mjs",): candidate = napcat_home / stale if candidate.exists(): candidate.unlink() copy_tree(runtime_root, napcat_home) ``` ```python def ensure_openclaw_container(distro: str, container_name: str, openclaw_port: int) -> None: quoted = shlex.quote(container_name) names = run_wsl(distro, "docker ps -a --format '{{.Names}}'", check=False).stdout.splitlines() if container_name not in {name.strip() for name in names}: run_wsl(distro, f"docker pull {shlex.quote(DEFAULT_CONTAINER_IMAGE)}") create_cmd = ( "docker create " f"--name {quoted} " f"-p {openclaw_port}:18789 " "-v openclaw-home:/root/.openclaw " "-w /root " f"{shlex.quote(DEFAULT_CONTAINER_IMAGE)} sleep infinity" ) run_wsl(distro, create_cmd) run_wsl(distro, f"docker start {quoted} >/dev/n ...[truncated 2018 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
assets/runtime/start-all.bat.txt:1
Finding

Entire Runtime Is Launched with Administrator Privileges and Stop Script Terminates Unrelated QQ Processes

Content
View full analysis
nul net session >nul 2>&1 if %ERRORLEVEL% neq 0 ( echo Administrator rights are required. Relaunching... powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" exit /b ) ``` ```bat echo [2/3] Stopping NapCat / QQ... taskkill /im QQ.exe /f >nul 2>&1 echo QQ stopped ``` ### Technical Analysis The start script requires elevation before starting the OpenClaw container, Node bridge, downloaded NapCat components, and QQ injection process. The script does not isolate a specific privileged operation; consequently, mutable third-party components are launched from an administrator context. The stop script force-terminates every process named `QQ.exe`, rather than tracking and stopping only the QQ instance created for the bridge. This can terminate unrelated user sessions and cause unsaved state or data loss. The declared local bridge functionality does not establish that the Node bridge, health checks, Docker commands, or all NapCat runtime operations require administrator privileges. ### Attack Path 1. The user starts the generated launcher and accepts the User Account Control elevation prompt. 2. The batch process runs with administrator privileges. 3. The launcher starts downloaded NapCat code and associated runtime components from that elevated context. 4. If any component or runtime file has been compromised, its payload executes with elevated host privileges. 5. When stopping the bridge, the stop script force-kills all `QQ.exe` processes, including unrelated instances. ### Impact Assessment A compromised Windows-side component may receive administrator-level privileges, substantially increasing its ability to alter files, processes, services, a ...[truncated 116 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (21)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- overlay a local `bridge.mjs`, `start-all.bat`, and `stop-all.bat`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- overlay a local `bridge.mjs`, `start-all.bat`, and `stop-all.bat`

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file exposes a persistent HTTP service with operational endpoints for health, log enumeration, log retrieval, config read/write, and QQ message sending, which materially exceeds the stated installer/start/repair/smoke-test purpose. Even on localhost, this broad control plane creates an attack surface for local malware, browser-based localhost abuse, or unintended operator exposure, especially because it can alter runtime behavior and access message data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The /logs, /logs/:filename, /config, and POST /config endpoints are unauthenticated, allowing any requester to read chat logs, inspect secrets/configuration, and mutate runtime settings. That combination enables both data exfiltration and control of downstream behavior, including changing service endpoints or tokens to redirect traffic or disrupt the bridge.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The /send_qq endpoint accepts unauthenticated requests and can send arbitrary messages to QQ targets through the bridge. This effectively turns the service into an open local messaging relay that can be abused by any local process, misconfigured network exposure, or browser-driven localhost request to impersonate the bot or spam users/groups.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/manage.py (reported line 276)May include surrounding context.

python
bridge_cfg = read_json(config_dir / "bridge.json", {})
    webui_cfg = read_json(config_dir / "webui.json", {})
    env_cfg = {}
    env_path = config_dir / ".env"
    if env_path.exists():
        for line in env_path.read_text(encoding="utf-8").splitlines():
            if "=" in line:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/manage.py (reported line 456)May include surrounding context.

python
bridge_cfg = read_json(config_dir / "bridge.json", {})
    webui_cfg = read_json(config_dir / "webui.json", {})
    env_cfg = {}
    env_path = config_dir / ".env"
    if env_path.exists():
        for line in env_path.read_text(encoding="utf-8").splitlines():
            if "=" in line:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill describes and directs use of powerful capabilities including file read/write, shell execution, and network access, but it does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, this weakens governance and review because consumers cannot easily tell what the skill is allowed to do, increasing the risk of over-privileged execution and unintended destructive actions on the host.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
79% confidence
Finding

The skill downloads software at runtime from public sources, including GitHub release metadata and Winget-installed QQ packages, which creates a supply-chain trust boundary. Even if the sources are legitimate, fetching the latest release dynamically without pinning versions or verifying cryptographic integrity can expose users to malicious upstream compromise, typosquatting, or unexpected breaking changes.

Content

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

md
Download sources used by the bundled script:

- `https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest`
- `winget install --id Tencent.QQ.NT --exact`

## Workflow

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code persistently stores chat content to disk and maintains conversation context in memory, despite the skill being described as an installer/repair utility rather than an always-on chat data processor. This creates undisclosed collection and retention of potentially sensitive user communications, increasing privacy and confidentiality risk if the host is shared or compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Writing user message content to disk without clear disclosure or consent is a genuine privacy/security issue because chat logs may contain sensitive personal or operational information. In the context of an installer-labeled skill, this is more concerning because users would not reasonably expect ongoing content retention beyond setup tasks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

Incoming message data is sent to NapCat/OpenClaw-related services as part of bridge operation, which may be functionally necessary, but it is still undisclosed data transmission. The main risk is privacy and expectation mismatch: users interacting with QQ may not know their content is being forwarded to another local service for processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This function launches wsl and docker exec to run an external agent process, which is a significant system operation. While subprocess execution may be part of the bridge's purpose, the code shown provides no nearby user-facing notice, comment, or docstring explaining that external commands will be run on the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This batch script performs destructive operational actions by forcibly killing local Windows processes and a process inside WSL/Docker using taskkill /f and pkill, but it provides no pre-action warning, confirmation prompt, or explanatory comment before doing so. Although it prints status messages after each action, those messages do not disclose the impact in advance or give the user a chance to avoid stopping potentially unrelated QQ or gateway processes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/manage.py (reported line 21)May include surrounding context.

python
DEFAULT_ROOT = Path.home() / "NapCat.OpenClaw"
DEFAULT_QQ_PACKAGE_ID = "Tencent.QQ.NT"
DEFAULT_NAPCAT_RELEASE_API = "https://api.github.com/repos/NapNeko/NapCatQQ/releases/latest"
DEFAULT_NAPCAT_ASSET = "NapCat.Shell.Windows.Node.zip"
DEFAULT_CONTAINER_IMAGE = "node:23-bookworm"
DEFAULT_BRIDGE_PORT = 3002

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/manage.py (reported line 36)May include surrounding context.

python
def run_command(args: list[str], *, cwd: Path | None = None, check: bool = True) -> subprocess.CompletedProcess[str]:
    printable = " ".join(shlex.quote(part) for part in args)
    print(f"+ {printable}")
    completed = subprocess.run(
        args,
        cwd=str(cwd) if cwd else None,
        text=True,

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The smoke test can send a real private QQ message to the configured admin account when the bridge is online, without an explicit prompt or confirmation at execution time. That can cause unintended outbound communication, privacy surprises, and operational confusion because a diagnostic action triggers contact with a live account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script can install software via winget, download and extract binaries from GitHub, write configuration and batch files, and optionally create/start a Docker container, yet it does not present an explicit confirmation or safety warning before making these host changes. In a skill/agent context, that raises the risk of surprising or unintended system modification, especially if invoked indirectly or with incomplete user awareness.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

toLocaleTimeString('zh-CN', ...) hard-codes a locale choice, which is a natural-language/locale policy concern when no opt-in or justification is provided. The file does not indicate that the skill is intentionally region-specific or that users can override this locale behavior.

Content

No source excerpt is available for this finding.