T09 · Insecure Skill Coding Practices
- Location
SKILL.md:61- Finding
Unauthenticated Local Runtime Discovery Can Redirect CLI Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 61–76
Vulnerability Type: Untrusted localhost discovery data used to select an executable
Risk Level: MediumRelevant instruction excerpt:
sh curl -s -m 2 --noproxy "*" http://127.0.0.1:3456/galic/v1/skill/cli-runtime # Paths are derived from the executable location returned by discovery: resources/crebee-cli/crebee.mjs resources/ffmpeg/ffmpeg # POSIX invocation form: ELECTRON_RUN_AS_NODE=1 "<exe>" "<crebee.mjs>" <command-and-arguments>Technical Analysis
The Skill instructs the Agent to query an unauthenticated HTTP endpoint on
127.0.0.1:3456and use its response to identify the running CreBee executable. It then derives the packaged CLI path from that executable location and runs the CLI withELECTRON_RUN_AS_NODE=1.Although loopback limits remote network access, it does not authenticate the process listening on the port. The documented flow does not require verification of:
- The identity of the process serving port 3456.
- The authenticity or integrity of the discovery response.
- The ownership and permissions of the returned executable.
- Whether the resolved executable and CLI script remain inside a trusted installation directory.
- A platform signature or cryptographic signature for the executable and CLI script.
Consequently, data received across an unauthenticated local network boundary controls which local executable and JavaScript entry point the Agent launches. Running Electron with
ELECTRON_RUN_AS_NODE=1gives the selected JavaScript code Node.js capabilities under the Agent's operating-system account.This is an exploitable design flaw, but the reviewed files do not demonstrate that the Skill author intended to exploit it. The project is therefore classified as suspicious rather than malicious.
Attack Path
- The legitimate CreBee client is not running, leaving local port 3456 a ...[truncated 1604 chars]
- Remediation
View remediation
Remediation Suggestions
- Authenticate the localhost discovery protocol using a per-installation or per-session secret that is not exposed through the discovery response.
- Cryptographically bind the returned runtime path to the installed CreBee client, such as by signing discovery responses and validating them against a trusted application key.
- Canonicalize all returned paths and require both the executable and CLI script to reside beneath an approved installation root.
- Verify file ownership and permissions before execution. Reject executables or scripts writable by untrusted users.
- Validate the platform code signature or a pinned cryptographic digest for both the CreBee executable and packaged CLI entry point.
- Confirm that the process listening on port 3456 is the expected signed CreBee process before trusting its response.
- Prefer an authenticated operating-system IPC mechanism over unauthenticated HTTP for local runtime discovery.
- Fail closed when identity or path validation fails; do not fall back to executing a path supplied solely by the localhost response.
