Back to skill

Security audit

飞牛论坛签到

Security checks for vulnerabilities and agentic risk

Overview

This skill appears intended to automate a forum sign-in, but it stores reusable login/OCR tokens locally and sends CAPTCHA images to Baidu, so users should review it carefully before use.

Install only if you are comfortable giving this skill your forum password and Baidu OCR credentials, allowing it to upload CAPTCHA images to Baidu, and storing reusable cookies/tokens on disk. Use a private data directory with restrictive permissions, avoid committing config or cache files, review dependency updates, and remove the cron job and cached files if you stop using it.

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/fnclub_signer.js:86
Finding
Authentication cookies and OAuth access tokens are stored in plaintext without enforced restrictive permissions<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/fnclub_signer.js:86-87` - `scripts/fnclub_signer.js:148-149` **Vulnerability Type**: Plaintext storage of reusable authentication credentials **Risk Level**: Medium ### Vulnerable Code Forum authentication cookies are serialized directly to a plaintext file: ```js const cookieList = cookies.map(c => ({ name: c.key, value: c.value, domain: c.domain, path: c.path })); fs.writeFileSync(this.config.cookieFile, JSON.stringify(cookieList, null, 2)); ``` The Baidu OAuth access token is also serialized directly to a plaintext file: ```js const { access_token, expires_in = 2592000 } = response.data; fs.writeFileSync(this.config.tokenCacheFile, JSON.stringify({ access_token, expires_time: Date.now() + (expires_in - 86400) * 1000 })); ``` ### Technical Analysis The application persists reusable forum session cookies and a Baidu OAuth access token using `fs.writeFileSync` without specifying a restrictive file mode. The effective permissions therefore depend on the process umask and the permissions of the selected data directory. By default, these files are stored under the script directory. However, the `FNCLUB_DATA_DIR` environment variable can redirect them to another directory. If that directory is shared, incorrectly permissioned, backed up insecurely, or accessible to another local account or process, the cached credentials may be disclosed. The stored forum cookies can represent an authenticated session and may allow account access without knowledge of the forum password. The Baidu access token can authorize OCR API requests until it expires or is revoked. ### Attack Path 1. The Skill runs and successfully authenticates to the forum or obtains a Baidu OAuth token. 2. It writes the credentials to `cookies.json` or `token_cache.json`. 3. The files receive permissions derived from the runtime umask rather than an explicitly enforced owner-only mode. 4. A local attacker, co-tenant process, or ser ...[truncated 1209 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create the credential-cache directory with owner-only permissions: ```js fs.mkdirSync(dataDir, { recursive: true, mode: 0o700 }); ``` 2. Write each sensitive cache file with mode `0600`: ```js fs.writeFileSync( this.config.cookieFile, JSON.stringify(cookieList, null, 2), { encoding: 'utf8', mode: 0o600 } ); ``` ```js fs.writeFileSync( this.config.tokenCacheFile, JSON.stringify({ access_token, expires_time: Date.now() + (expires_in - 86400) * 1000 }), { encoding: 'utf8', mode: 0o600 } ); ``` 3. Explicitly correct permissions on existing files because the `mode` option does not necessarily tighten permissions when an existing file is overwritten: ```js fs.chmodSync(this.config.cookieFile, 0o600); fs.chmodSync(this.config.tokenCacheFile, 0o600); ``` 4. Validate `FNCLUB_DATA_DIR` before use. Reject shared or unexpectedly permissioned directories and avoid placing credential caches in temporary, network-mounted, or web-accessible locations. 5. Use atomic writes through a securely created temporary file in the same protected directory, followed by a rename. Ensure the temporary file is also created with mode `0600`. 6. Where available, store credentials in an operating-system credential vault or dedicated secret store rather than plaintext JSON. 7. Document that `cookies.json`, `token_cache.json`, and the optional `config.json` are sensitive. Exclude them from source control, logs, shared backups, and artifact bundles. 8. Provide a cleanup procedure that deletes cached files and instructs users to invalidate the forum session and revoke the Baidu token after suspected exposure. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Ae1

High
Category
analysis-evasion
Content
node scripts/fnclub_signer.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/fnclub_signer.js
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Known Vulnerable Dependency: axios==1.13.6 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
93% confidence
Finding
The lockfile pins axios 1.13.6, and the supplied advisories include SSRF, prototype-pollution-assisted MITM, and credential theft/response hijacking classes of issues. In a forum auto-sign-in skill that performs authenticated outbound HTTP requests and handles cookies/session state, a vulnerable HTTP client materially increases risk because redirects, proxy handling, and crafted responses may expose credentials or let requests reach unintended hosts.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
80% confidence
Finding
form-data 4.0.5 is flagged for CRLF injection via unescaped multipart field names and filenames. This package is only dangerous if the skill builds multipart requests from attacker-controlled input; the lockfile alone cannot prove exploitability, but the dependency itself is genuinely vulnerable and could become exploitable if reused in future code paths.

Known Vulnerable Dependency: undici==7.22.0 — 16 advisory(ies): CVE-2026-1525 (Undici has an HTTP Request/Response Smuggling issue); CVE-2026-6733 (undici vulnerable to HTTP response queue poisoning via keep-alive socket reuse); CVE-2026-1527 (Undici has CRLF Injection in undici via `upgrade` option) +13 more

High
Category
Supply Chain
Confidence
80% confidence
Finding
undici 7.22.0 is listed with multiple high-severity HTTP parsing and request/response smuggling-style advisories. Because this skill depends on cheerio, which brings undici for network-related functionality, a vulnerable HTTP stack can enable response poisoning, request confusion, or header injection when interacting with remote servers, which is dangerous in a login/sign-in automation context handling authenticated sessions.

Known Vulnerable Dependency: axios==1.13.6 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
97% confidence
Finding
The manifest includes axios 1.13.6, which the finding states has multiple known advisories, including SSRF and man-in-the-middle/prototype-pollution-related issues. In a skill that logs into a remote service using user credentials and likely traverses network/proxy boundaries, a vulnerable HTTP client can directly expose secrets, enable request redirection, or subvert response handling.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill requires access to sensitive environment variables such as account credentials and OCR API secrets, but the manifest does not declare any tool scope or permissions boundary. This weakens auditability and least-privilege controls, making it harder for a platform or reviewer to understand that the skill will read secrets and increasing the risk of unintended secret exposure or overbroad execution.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation instructs users to store highly sensitive data including forum passwords, cookies, and OCR tokens in local files and cache locations, but it does not provide clear security warnings or protections for those artifacts. If those files are read by other local processes, committed to a repository, or left with weak filesystem permissions, an attacker could hijack the forum account and abuse the linked OCR API credentials.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The skill requires Baidu OCR API credentials and uses an external OCR service to solve forum CAPTCHA challenges, which is beyond simple sign-in automation and introduces third-party data sharing and anti-abuse bypass behavior. In this context, the extra capability expands the trust boundary and may violate user expectations or site protections, making it a real security/privacy concern rather than a harmless implementation detail.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The script persists authenticated forum cookies to a local JSON file, and elsewhere also caches OAuth access tokens, without any access controls, encryption, or user-facing warning. If the host is shared or compromised, these artifacts can be reused to hijack the forum session or abuse the linked OCR account.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The code contains a full OCR/token acquisition flow that is not disclosed in the skill description, meaning users may unknowingly provide API keys and allow transmission of CAPTCHA content to a third party. Hidden or under-disclosed external capabilities are dangerous because they create privacy, compliance, and account-risk issues outside the apparent purpose of the skill.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The script uploads CAPTCHA image data to Baidu OCR without explicit notice or consent, sending site-generated challenge data and associated request metadata to an external provider. This is a real privacy and policy risk, especially because users invoking a forum sign-in skill would not reasonably expect third-party image processing of anti-bot challenges.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The package metadata advertises 'automatic login and session saving', which expands the skill’s behavior beyond a simple one-time forum sign-in/status check into persistent credentialed session handling. In a skill that already requests username/password and a writable data directory, this increases the risk of long-lived cookie or token storage being misused, stolen, or retained longer than users expect.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The manifest description and all environment-variable descriptions are written only in Chinese, which effectively imposes a specific language on users and operators. There is no indication of user opt-in, multilingual support, or a documented reason that this skill must be Chinese-only.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill requests Baidu OCR API credentials even though the stated purpose is forum sign-in. Unrelated high-value credentials materially increase attack surface: they can enable exfiltration or third-party API abuse, and the mismatch between requested secrets and declared function is a strong sign of over-privileged design.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The request headers force Accept-Language to 'zh-CN,zh;q=0.9,en;q=0.8', which imposes a specific locale preference in network interactions. Under the policy, language or locale constraints should not be forced without user opt-in or clear documented justification.

Known Vulnerable Dependency: follow-redirects==1.15.11 — 1 advisory(ies): CVE-2026-40895 (follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Ta)

Low
Category
Supply Chain
Confidence
84% confidence
Finding
follow-redirects 1.15.11 is reported to leak custom authentication headers across cross-domain redirects. This is especially relevant for an automated sign-in skill, because authenticated requests to the forum may carry cookies or custom auth headers, and an attacker controlling or influencing a redirect target could capture those secrets.

Unpinned Dependencies

Low
Category
Supply Chain
Content
}
  },
  "dependencies": {
    "axios": "^1.13.6",
    "cheerio": "^1.2.0",
    "tough-cookie": "^6.0.0"
  }
Confidence
82% confidence
Finding
Using a caret range for axios permits automatic adoption of future minor/patch releases, which can introduce unreviewed behavioral changes or supply-chain risk. In a credential-handling automation skill that performs authenticated web requests, dependency drift is more dangerous because regressions can affect request security, proxy handling, or secret exposure.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "dependencies": {
    "axios": "^1.13.6",
    "cheerio": "^1.2.0",
    "tough-cookie": "^6.0.0"
  }
}
Confidence
76% confidence
Finding
The cheerio dependency is not pinned to an exact version, allowing unreviewed updates within the semver range. While lower risk than a network client library, it still creates avoidable supply-chain and reproducibility issues in a skill that processes remote HTML from an authenticated site.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"dependencies": {
    "axios": "^1.13.6",
    "cheerio": "^1.2.0",
    "tough-cookie": "^6.0.0"
  }
}
Confidence
78% confidence
Finding
The tough-cookie dependency is unpinned, which is notable because it handles authentication cookies and session state. Unreviewed updates in a session-management library can affect cookie isolation, persistence, or security semantics in ways that impact stored forum sessions.

Static analysis

Detected: suspicious.env_credential_access, suspicious.exposed_secret_literal, suspicious.potential_exfiltration

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/fnclub_signer.js:16

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/fnclub_signer.js:143

Sensitive-looking file read is paired with a network send.

Warn
Code
suspicious.potential_exfiltration
Location
scripts/fnclub_signer.js:66