Back to skill

Security audit

Feishu Media Delivery

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate Feishu media delivery helper, but it needs Review because its scripts can upload arbitrary readable local files to a caller-supplied Feishu user without containment or confirmation.

Install only if you trust the agent workflows that will invoke it. Treat the recipient ID and file path as sensitive controls: do not allow untrusted prompts to choose them, restrict execution to a generated-media directory, protect the Feishu app secret, and update or pin the Node dependencies before production use.

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/send-media.mjs:8
Finding

Unrestricted Local File Upload to an Attacker-Controlled Feishu Recipient

Content
View full analysis
[file_type] [duration_ms]'); const APP_SECRET = fs.readFileSync(APP_SECRET_PATH, 'utf8').trim(); const client = new Lark.Client({ appId: APP_ID, appSecret: APP_SECRET, domain: Lark.Domain.Feishu, appType: Lark.AppType.SelfBuild, }); const fileStream = fs.createReadStream(FILE_PATH); const fileName = FILE_PATH.split('/').pop(); const data = { file_type: FILE_TYPE, file_name: fileName, file: fileStream, }; if (DURATION_MS) data.duration = Number(DURATION_MS); const uploadRes = await client.im.v1.file.create({ data }); console.log('UPLOAD_RES', JSON.stringify(uploadRes, null, 2)); const fileKey = uploadRes.data?.file_key || uploadRes.file_key; if (!fileKey) throw new Error('no file_key returned'); const sendRes = await client.im.v1.message.create({ params: { receive_id_type: 'open_id' }, data: { receive_id: RECEIVE_ID, msg_type: 'media', content: JSON.stringify({ file_key: fileKey }), }, }); ``` ### Technical Analysis The script is documented as an MP4 delivery utility, but it accepts an arbitrary filesystem path through `process.argv[3]` and an arbitrary file type through `process.argv[4]`. The file type defaults to the generic value `stream`. The path is passed directly to `fs.createReadStream()` without any of the following controls: - Canonical-path validation - Restriction to an approved media output directory - File extension or MIME-type validation - Media signature verification - Regular-file verifica ...[truncated 2005 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (13)

Known Vulnerable Dependency: protobufjs==7.5.4 — 12 advisory(ies): CVE-2026-44294 (protobuf.js: Denial of service from crafted field names in generated code); CVE-2026-44293 (protobuf.js: Code injection through bytes field defaults in generated toObject c); CVE-2026-44289 (protobuf.js: Denial of service through unbounded protobuf recursion) +9 more

Critical
Category
Supply Chain
Confidence
90% confidence
Finding

protobufjs is present with an install script and multiple serious advisories, but the most severe issues often depend on generating code from attacker-controlled schemas or parsing malicious protobuf payloads. In this Feishu media-delivery skill, that risk is less directly aligned than the HTTP client issues, yet if the SDK exercises protobuf parsing on untrusted remote data, denial of service or code-generation-related abuse could still be relevant.

Content

No source excerpt is available for this finding.

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
92% confidence
Finding

axios is a network-facing HTTP client used by the Feishu SDK, so dependency vulnerabilities affecting proxy handling, SSRF behavior, redirect handling, or prototype-pollution-adjacent request manipulation are materially relevant in this skill context. Because this skill uploads media and sends messages to external APIs, exploitation could enable request redirection, credential leakage, or unintended outbound access if attacker-controlled endpoints, proxy settings, or request metadata are involved.

Content

No source excerpt is available for this finding.

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
87% confidence
Finding

form-data is involved in multipart uploads, which are central to this skill's image/video delivery behavior. A CRLF injection flaw in multipart field names or filenames can become exploitable if any upload metadata is derived from attacker-controlled values, potentially enabling request smuggling or malformed multipart bodies sent to downstream services.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==8.19.0 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
80% confidence
Finding

ws is a network protocol library and its memory disclosure/DoS advisories are meaningful if the SDK opens WebSocket connections in environments where remote peers are not fully trusted. While this media-delivery skill is primarily about outbound Feishu uploads and messaging, including a vulnerable ws version still creates avoidable attack surface for memory exhaustion or data exposure if WebSocket functionality is enabled.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs agents to transmit local media files and recipient identifiers to Feishu, but it does not clearly warn users that content and target identifiers leave the local environment and are sent to a third-party service. In an agent setting, that omission can cause unintended disclosure of sensitive images, videos, or user IDs because operators may not realize an external transfer is occurring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code reads sensitive credential material from a local secret file and then uploads an image and sends a message via the Feishu API. While it logs responses, there is no confirmation prompt, warning comment, or user-facing notice that the script will access local credentials and transmit file contents to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code reads the Feishu app secret from a local secrets path and then uploads the specified file to the Feishu API. While the operations are central to the script's purpose, the file itself provides no confirmation prompt, warning comment, or user-facing disclosure about credential access and external transmission of file contents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill documents required Feishu application credentials and a default secret file path, but it does not include a clear warning about handling those secrets securely. That omission increases the chance that users expose app credentials through insecure storage, logging, prompt leakage, or accidental inclusion in repositories, which could enable unauthorized use of the Feishu app.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: @protobufjs/utf8==1.1.0 — 1 advisory(ies): CVE-2026-44288 (protobufjs has overlong UTF-8 decoding)

Low
Category
Supply Chain
Confidence
60% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

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 is used under axios, and a cross-domain redirect header-leak issue is relevant for a skill that may send authenticated requests to remote services. If a request can be redirected to an attacker-controlled domain, custom authorization headers or similar secrets could be exposed, which is especially sensitive for Feishu app tokens or tenant credentials.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: qs==6.15.0 — 3 advisory(ies): CVE-2026-82417 (qs: Denial of Service via Attacker Controlled isBuffer); CVE-2026-8723 (qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/u); CVE-2026-82562 (qs array-limit bypass via bracket-key comma parsing)

Low
Category
Supply Chain
Confidence
60% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · scripts/package.json (reported line 6)May include surrounding context.

json
"private": true,
  "type": "module",
  "dependencies": {
    "@larksuiteoapi/node-sdk": "^1.39.0"
  }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The script explicitly forces the Feishu domain via Lark.Domain.Feishu, which can constitute a locale/platform policy constraint if users are not given a choice or told why this region-specific service is required. No natural-language justification or opt-in is present in the file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.