Back to skill

Security audit

Farcaster Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Farcaster/Neynar client, but it needs Review because its setup and account-changing commands lack safeguards around credentials and destructive or public actions.

Install only if you are comfortable giving the agent a Neynar API key and signer UUID that can act on your Farcaster account. Avoid the documented eval credential-loading pattern and avoid passing secrets on the command line; use protected environment variables or a secret store instead. Require explicit confirmation before posting, reacting, following, or deleting, and treat cast deletion as irreversible unless Neynar/Farcaster provides recovery outside this skill.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:19
Finding

Arbitrary Shell Command Execution Through Unsafe Credential Initialization

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 19-21
Vulnerability Type: Shell command injection through unsafe use of eval
Risk Level: High

Vulnerable Code

bash
Alternatively, put credentials in a JSON file and source them:
```bash
eval $(jq -r '"export NEYNAR_API_KEY=\(.apiKey)\nexport NEYNAR_SIGNER_UUID=\(.signerUuid)"' /path/to/neynar.json)

Technical Analysis

The documented credential-loading command converts values from a JSON file into shell source code and executes the result with eval. The extracted apiKey and signerUuid values are interpolated without shell-safe quoting.

Consequently, these fields are treated as executable shell syntax rather than strictly as data. Shell metacharacters, command substitutions, redirections, or command separators placed in either JSON value can alter the generated command and execute arbitrary local commands.

For example, a malicious credential value containing a command separator can cause the generated output to include an additional command when evaluated. The vulnerability does not require a defect in jq; it results from passing attacker-influenced output to the shell parser through eval.

Attack Path

  1. An attacker creates or modifies the credential JSON file used during setup.
  2. The attacker places shell syntax in the apiKey or signerUuid field.
  3. A user follows the setup instructions and executes the documented eval $(jq ...) command.
  4. jq emits an export statement containing the malicious value.
  5. eval reparses the emitted text as shell code.
  6. The injected command executes with the privileges of the user running the setup command.

This path is exploitable when an attacker can influence the credential file, its source, or its contents.

Impact Assessment

Successful exploitation provides arbitrary command execution under the current user's account. The attacker could read or modify files available to that user, steal environment va ...[truncated 232 chars]

Remediation
View remediation

Remediation Suggestions

Remove eval and assign each parsed value directly so that it is never reparsed as shell syntax:

bash
NEYNAR_API_KEY=$(jq -er '.apiKey' /path/to/neynar.json)
NEYNAR_SIGNER_UUID=$(jq -er '.signerUuid' /path/to/neynar.json)
export NEYNAR_API_KEY NEYNAR_SIGNER_UUID

Additionally:

  • Require the credential file to be owned by the current user and protected with restrictive permissions such as 0600.
  • Validate that both properties are strings and conform to the expected API-key and UUID formats.
  • Reject missing, null, multiline, or malformed values.
  • Avoid recommending source for files containing externally supplied content.
  • Add a regression test containing shell metacharacters in JSON values and verify that no command is executed.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fc_cast.sh:29
Finding

Sensitive API Credentials Accepted Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/fc_cast.sh, lines 29-30 and 52-53; equivalent handling appears in all API scripts
Vulnerability Type: Credential exposure through process arguments and shell history
Risk Level: Medium

Vulnerable Code

bash
--api-key KEY          Neynar API key (or set NEYNAR_API_KEY)
--signer UUID          Signer UUID (or set NEYNAR_SIGNER_UUID)
bash
--api-key) API_KEY="$2"; shift 2 ;;
--signer) SIGNER="$2"; shift 2 ;;

The same API-key argument pattern appears in:

  • scripts/fc_feed.sh:31,52
  • scripts/fc_user.sh:25,43
  • scripts/fc_search.sh:24,42
  • scripts/fc_channels.sh:24,41
  • scripts/fc_react.sh:25-26,42-43
  • scripts/fc_delete.sh:17-18,30-31

The signer argument is also accepted by the write-operation scripts.

Technical Analysis

Secrets supplied as command-line arguments become part of the process argument vector. Depending on the operating system and local security configuration, these values may be visible to process-listing and monitoring tools while the script runs. Interactive invocations may also be retained in shell history, terminal logging, automation logs, debugging output, or job metadata.

The scripts correctly quote the values during assignment and do not directly create command injection through these options. The issue is the exposure channel created by transporting long-lived credentials in command-line arguments.

Attack Path

  1. A user invokes a script with --api-key SECRET and, for a write operation, --signer UUID.
  2. The complete command may be written to shell history or captured by terminal, CI, orchestration, or audit logging.
  3. While the process is active, a local observer with sufficient process-inspection access may read its argument list.
  4. The observer extracts the API key and signer UUID.
  5. The exposed credentials are used to submit authorized Neynar API requests within the permissions of the associated account and signer.

Exploitatio ...[truncated 596 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove or deprecate --api-key and --signer command-line options.
  • Prefer the existing NEYNAR_API_KEY and NEYNAR_SIGNER_UUID environment variables for noninteractive use.
  • For interactive use, support silent input with read -r -s or read credentials from standard input without echoing them.
  • Alternatively, load credentials from a user-owned configuration file with 0600 permissions and parse it without eval or source.
  • Ensure CI and orchestration systems inject secrets through protected secret stores rather than command arguments.
  • Document credential rotation and advise users to rotate any key entered on a shared command line or exposed in logs.
  • Avoid printing credentials in debugging output, error messages, traces, or test fixtures.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The code is narrower than the declared description. The implemented behavior aligns with only a subset of the declared purpose: posting casts and replying/threading within a channel. There is no code for reading feeds, searching casts, profile lookup, liking, recasting, deleting, or channel listing/search. This is a description-to-behavior mismatch because the declared description presents the skill as a multi-function Farcaster client, while the supplied code chunk is just a cast-posting script.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The code chunk implements only user lookup functionality against Neynar user endpoints (user/by_username, user/bulk, user/bulk-by-address). It does not post content, read feeds, search casts, engage with casts, delete casts, or interact with channels. One declared capability—looking up user profiles by username or FID—is represented, and the code even adds ETH-address lookup and bulk FID lookup, which are related extensions rather than problematic undeclared behavior. However, the declared description presents a broad Farcaster interaction skill, while the supplied code is only a user-profile lookup utility, so the description materially overstates the actual behavior.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
86% confidence
Finding

The documented DELETE /cast operation accepts a target hash and signer identity, enabling an agent to perform destructive actions if user-supplied or model-generated parameters are misinterpreted. In an agent/tooling context, this is a classic parameter-abuse risk because a malicious prompt or ambiguous instruction could cause deletion of the wrong cast.

Content

Scanner excerpt · references/neynar_endpoints.md (reported line 31)May include surrounding context.

}

text

### DELETE /cast — Body
```json
{
  "signer_uuid": "required",

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises shell and network-capable behavior but does not declare any explicit tool scope, permissions, or allowed-tools boundary. In an agent environment, this increases the chance that the skill can be invoked with broader-than-expected execution privileges, enabling unintended outbound requests or shell actions without clear policy review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation exposes a destructive delete operation with no warning, confirmation step, or guidance to require explicit user authorization. In an agentic context, this makes accidental or unauthorized content deletion more likely, especially if a model infers deletion from ambiguous instructions or executes a harmful chain of actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Delete-cast functionality is destructive and permanently alters user-visible account state, yet the documentation presents it without any caution, confirmation requirement, or safety guidance. In an agent context, omission of such guardrails makes accidental or prompt-induced deletion materially more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The reference documentation exposes follow/unfollow capabilities that are outside the skill manifest's stated behavior. This creates scope drift: an agent or downstream integrator may invoke undocumented account-modifying actions the user did not expect, increasing the risk of unauthorized social-graph changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Follow/unfollow operations alter a user's social graph and may have privacy, reputation, and trust implications, yet the docs provide no warning or confirmation guidance. In an autonomous-agent setting, this increases the chance of silent or unintended relationship changes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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/fc_cast.sh (reported line 110)May include surrounding context.

sh
fi

# Make the request
RESP=$(curl -sS --connect-timeout 10 --max-time 30 -w "\n%{http_code}" -X POST "$NEYNAR_BASE/cast" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d "$BODY")

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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/fc_delete.sh (reported line 49)May include surrounding context.

sh
BODY=$(jq -n --arg s "$SIGNER" --arg h "$HASH" '{signer_uuid: $s, target_hash: $h}')

RESP=$(curl -sS --connect-timeout 10 --max-time 30 -w "\n%{http_code}" -X DELETE "$NEYNAR_BASE/cast" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d "$BODY")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script performs an irreversible deletion of a Farcaster cast via an HTTP DELETE request, but it provides no confirmation prompt and no explicit warning in the help text or nearby comments that the action is destructive. Although deletion is implied by the filename, the user-facing usage output does not disclose the irreversible effect before execution.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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/fc_react.sh (reported line 83)May include surrounding context.

sh
exit 1
fi

RESP=$(curl -sS --connect-timeout 10 --max-time 30 -w "\n%{http_code}" $METHOD "$ENDPOINT" "${HEADERS[@]}" -d "$BODY")
HTTP_CODE=$(echo "$RESP" | tail -1)
RESP_BODY=$(echo "$RESP" | sed '$d')

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 · references/neynar_endpoints.md (reported line 3)May include surrounding context.

md
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

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/fc_cast.sh (reported line 7)May include surrounding context.

sh
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

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/fc_channels.sh (reported line 6)May include surrounding context.

sh
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

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/fc_delete.sh (reported line 6)May include surrounding context.

sh
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

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/fc_feed.sh (reported line 7)May include surrounding context.

sh
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

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/fc_react.sh (reported line 6)May include surrounding context.

sh
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

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/fc_search.sh (reported line 6)May include surrounding context.

sh
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

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/fc_user.sh (reported line 7)May include surrounding context.

sh
# fc_search.sh — Search Farcaster casts via Neynar v2 API

NEYNAR_BASE="https://api.neynar.com/v2/farcaster"
API_KEY="${NEYNAR_API_KEY:-}"
QUERY=""
AUTHOR_FID=""

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The setup instructions recommend exporting secrets into the shell via eval $(jq ...) without any warning about shell history, process inspection, accidental logging, or the risks of evaluating derived shell code. While the immediate example is static and common, this pattern can normalize unsafe secret handling and make credential exposure more likely in shared or automated environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Like/recast endpoints modify account state and can perform public actions on behalf of a user, but the reference lacks any warning that these actions are state-changing. While less severe than deletion, undocumented write behavior can still cause unintended engagement, reputation issues, or spammy activity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script accepts the Neynar API key via the --api-key command-line flag, which can expose the secret through process listings, shell history, audit logs, or job metadata on multi-user systems. In an agent/tooling context, this is more dangerous because orchestration frameworks often log full command invocations, increasing the chance of credential leakage.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.