registry  /  claude-codex-wechat  /  0.1.19

claude-codex-wechat@0.1.19

`claude-codex-wechat` 是一个本地 bridge daemon。它把:

AI Security Review

scanned 3d ago · by lpm-firewall-ai

Confirmed dangerous dual-use bridge: remote WeChat/relay input can steer local Claude/Codex sessions, and Claude is launched with permission bypass. Behavior is runtime/user-invoked rather than install-time, but it exposes an AI-agent control surface with persistence and public relay support.

Static reason
High-risk behavior combination matched malicious policy.
Trigger
User runs claude-codex-wechat start, enables/binds WeChat, then remote chat or relay messages arrive.
Impact
Remote authorized WeChat/relay users can drive local Claude/Codex sessions in the configured workspace; Claude runs without normal permission prompts.
Mechanism
persistent remote chat-to-local-agent bridge with permission bypass
Attack narrative
When started, the CLI installs or starts a background daemon, exposes local HTTP admin/API routes, connects to a relay, polls WeChat, and routes incoming chat messages into Claude Code or Codex. The Claude runner always includes --dangerously-skip-permissions and resume helpers may write bypassPermissions metadata into Claude session files. This is package-aligned but materially expands AI-agent control risk.
Rationale
The scanner's remote decode/execute label is not supported by source inspection: media download decrypts and writes WeChat media, not executable code. However, the package does expose a dangerous remote AI-agent control surface with permission bypass, so it should warn rather than be marked clean or malicious.
Evidence
package.jsonREADME.mdconfig.example.jsondist/server/cli.js~/.claude-codex-wechat/config.json~/.claude/projects/*.jsonl~/.claude/history.jsonl~/.codex/session_index.jsonl~/.codex/state_5.sqlite~/Library/LaunchAgents/com.claude-codex-wechat.plist~/.config/systemd/user/claude-codex-wechat.service
Network endpoints4
ilinkai.weixin.qq.comnovac2c.cdn.weixin.qq.com/c2cwss://wechat.style520.com/agent127.0.0.1:8787

Decision evidence

public snapshot
AI called this Suspicious at 86.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for block
  • dist/server/cli.js runs Claude with --dangerously-skip-permissions for bridged WeChat messages.
  • dist/server/cli.js can rewrite Claude session JSONL to add permissionMode:bypassPermissions during resume repair.
  • dist/server/cli.js starts a persistent launchd/systemd/user daemon and listens on 0.0.0.0:8787.
  • dist/server/cli.js creates a default relay auth token and connects to wss://wechat.style520.com/agent.
  • dist/server/cli.js forwards relay request payloads to local http://127.0.0.1:<port> API routes.
Evidence against
  • package.json has no install/postinstall lifecycle hook; prepublishOnly is build-only and not consumer install-time.
  • README.md openly describes a local WeChat to Claude/Codex bridge daemon.
  • Network endpoints are aligned with WeChat login/media and relay functionality.
  • No eval/vm/Function or decoded remote code execution was found in inspected source.
  • Child processes are claude/codex, service managers, and platform utilities aligned with CLI behavior.
Behavioral surface
Source
ChildProcessCryptoEnvironmentVarsFilesystemNetworkShellWebSocket
Supply chain
HighEntropyStringsMinifiedUrlStrings
Manifest
NoLicenseWildcardDependency
scanned 2 file(s), 424 KB of source, external domains: 127.0.0.1, ilinkai.weixin.qq.com, novac2c.cdn.weixin.qq.com, react.dev, www.apple.com, www.w3.org

Source & flagged code

6 flagged · loading source
dist/server/cli.jsView file
21// src/channels/weixin-direct/loginClient.ts L22: var DEFAULT_BASE_URL = "https://ilinkai.weixin.qq.com"; L23: var WeixinDirectLoginClient = class { ... L60: if (!response.ok) throw new Error(`weixin_login_request_failed:${response.status}`); L61: const payload = await response.json(); L62: return payload.data ?? payload; ... L70: function defaultConfigPath() { L71: return join(homedir(), ".claude-codex-wechat", "config.json"); L72: } L73: function loadBridgeConfig(path = process.env.BRIDGE_CONFIG ?? defaultConfigPath()) { L74: if (!existsSync(path)) return normalizeBridgeConfig({}, process.env, path); ... L1077: }));
Critical
Remote Asset Decode Execute

Source fetches a remote non-code asset, decodes its contents, and dynamically executes the decoded payload.

dist/server/cli.jsView on unpkg · L21
Trigger-reachable chain: manifest.bin -> dist/server/cli.js Reachable file contains a blocking source-risk pattern.
Critical
Trigger Reachable Dangerous Capability

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

dist/server/cli.jsView on unpkg
2321// src/providers/claude-code/claudeStreamingRunner.ts L2322: import { spawn as spawn2 } from "node:child_process"; L2323: import { randomUUID as randomUUID2 } from "node:crypto";
High
Child Process

Package source references child process execution.

dist/server/cli.jsView on unpkg · L2321
21Detached bundled service listener: dist/server/cli.js launches a Node helper and exposes a broad-bound HTTP listener. L21: // src/channels/weixin-direct/loginClient.ts L22: var DEFAULT_BASE_URL = "https://ilinkai.weixin.qq.com"; L23: var WeixinDirectLoginClient = class { ... L60: if (!response.ok) throw new Error(`weixin_login_request_failed:${response.status}`); L61: const payload = await response.json(); L62: return payload.data ?? payload; ... L70: function defaultConfigPath() { L71: return join(homedir(), ".claude-codex-wechat", "config.json"); L72: } L73: function loadBridgeConfig(path = process.env.BRIDGE_CONFIG ?? defaultConfigPath()) { L74: if (!existsSync(path)) return normalizeBridgeConfig({}, process.env, path); ... L1077: }));
High
Spawned Bundled Service Listener

Source launches a detached bundled service that exposes a broad-bound HTTP listener.

dist/server/cli.jsView on unpkg · L21
21// src/channels/weixin-direct/loginClient.ts L22: var DEFAULT_BASE_URL = "https://ilinkai.weixin.qq.com"; L23: var WeixinDirectLoginClient = class { ... L60: if (!response.ok) throw new Error(`weixin_login_request_failed:${response.status}`); L61: const payload = await response.json(); L62: return payload.data ?? payload; ... L70: function defaultConfigPath() { L71: return join(homedir(), ".claude-codex-wechat", "config.json"); L72: } L73: function loadBridgeConfig(path = process.env.BRIDGE_CONFIG ?? defaultConfigPath()) { L74: if (!existsSync(path)) return normalizeBridgeConfig({}, process.env, path); ... L1077: }));
Medium
Install Persistence

Source writes installer persistence such as shell profile or service configuration.

dist/server/cli.jsView on unpkg · L21
dist/web/assets/bootstrap-icons-mSm7cUeB.woff2View file
path = dist/web/assets/bootstrap-icons-mSm7cUeB.woff2 kind = high_entropy_blob sizeBytes = 134044 magicHex = [redacted]
High
Ships High Entropy Blob

Package ships high-entropy non-source blobs.

dist/web/assets/bootstrap-icons-mSm7cUeB.woff2View on unpkg

Findings

2 Critical4 High5 Medium6 Low
CriticalRemote Asset Decode Executedist/server/cli.js
CriticalTrigger Reachable Dangerous Capabilitydist/server/cli.js
HighChild Processdist/server/cli.js
HighShell
HighSpawned Bundled Service Listenerdist/server/cli.js
HighShips High Entropy Blobdist/web/assets/bootstrap-icons-mSm7cUeB.woff2
MediumNetwork
MediumEnvironment Vars
MediumInstall Persistencedist/server/cli.js
MediumStructural Risk Force Deep Review
MediumWildcard Dependency
LowNon Install Lifecycle Scripts
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings
LowNo License