Back to skill

Security audit

pricewin-flight-search

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed flight-search MCP integration, but its installer persistently registers a remote server across multiple local agent apps and has a real Codex TOML injection risk when a custom URL is supplied.

Install only if you are comfortable trusting PriceWin's hosted MCP server and want it available in every detected agent app. Prefer running the dry run first, review which config files would change, avoid custom --url or PRICEWIN_MCP_URL values unless you control them, and keep the .bak backups so you can remove the registration later.

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
install.sh:101
Finding

Unescaped MCP URL Allows TOML Configuration Injection

Content
View full analysis
&2; exit 2 ;; esac done ``` ```bash merge_codex(){ local file="$HOME/.codex/config.toml" [ -d "$HOME/.codex" ] || return 1 if [ -f "$file" ] && grep -q "^\[mcp_servers\.${MCP_NAME}\]" "$file"; then say "OK $file (already registered)" return 0 fi if [ "$DRY_RUN" = "1" ]; then say "WOULD append [mcp_servers.$MCP_NAME] to $file" return 0 fi [ -f "$file" ] && [ ! -f "$file.bak" ] && cp "$file" "$file.bak" mkdir -p "$HOME/.codex" { echo echo "[mcp_servers.${MCP_NAME}]" echo "url = \"${MCP_URL}\"" } >> "$file" say "ADDED $MCP_NAME in $file" } ``` ### Technical Analysis The MCP URL can be supplied through either the `PRICEWIN_MCP_URL` environment variable or the `--url` command-line argument. The value is interpolated directly into a quoted TOML string without validation or TOML escaping. A value containing quotation marks and newline characters can terminate the intended `url` value and insert additional TOML sections or properties into `~/.codex/config.toml`. Shell quoting prevents immediate shell-command substitution while the installer runs, but it does not prevent configuration injection into the generated TOML. The JSON configuration path does not have this specific issue because Node's `JSON.stringify` escapes values during serialization. The vulnerable path is the manually generated Codex TOML block. ### Attack Path 1. An attacker persuades the user to execute the installer with a craft ...[truncated 1832 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is described as a flight-fare search tool, but its primary operational prerequisite is running an install script that scans for and edits local agent configuration files to register a remote MCP server. This mismatch is dangerous because users and host agents may grant trust based on a benign travel-search description while hidden or underemphasized behavior expands local and remote execution surface.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instructions specify language="vi" as a parameter to use 'as needed,' and the mandated response template is written in Vietnamese ('bay thẳng', 'tổng cho', 'khách'), indicating a default locale bias. There is no explicit user choice or opt-in for language, which violates the policy against forcing a specific language or locale.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 117)May include surrounding context.

md
`install.sh`, which adds one MCP entry (`pricewin` → `https://mcp.price.win/mcp`)

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
96% confidence
Finding

Accessing and modifying ~/.codex/config.toml creates persistent agent configuration changes in a sensitive local application directory. This is dangerous because it silently extends trust to a remote MCP service for future sessions, enabling lasting capability expansion and potential data exposure if the server is later abused or replaced.

Content

Scanner excerpt · install.sh (reported line 109)May include surrounding context.

sh
# Codex keeps TOML, which has no safe merge without a parser we can rely on, so we
# only ever append a block and only when it is absent.
merge_codex(){
  local file="$HOME/.codex/config.toml"
  [ -d "$HOME/.codex" ] || return 1
  if [ -f "$file" ] && grep -q "^\[mcp_servers\.${MCP_NAME}\]" "$file"; then
    say "OK $file (already registered)"

MCP Config Access

High
Category
Agent Snooping
Confidence
97% confidence
Finding

Editing Cursor's mcp.json directly is a real security concern because MCP config controls what remote tool servers the agent may use. Persistently adding an HTTP MCP endpoint can grant future conversations access to externally controlled tools, which is more sensitive than ordinary application preferences.

Content

Scanner excerpt · install.sh (reported line 161)May include surrounding context.

sh
merge_json "$cfg" mcpServers "$shape"
  fi
done <<EOF
$HOME/.cursor/mcp.json|url
$HOME/.codeium/windsurf/mcp_config.json|serverUrl
$HOME/.gemini/settings.json|httpUrl
EOF

MCP Config Access

High
Category
Agent Snooping
Confidence
97% confidence
Finding

Editing Windsurf's mcp_config.json persists a new remote MCP server into the agent's trusted tool set. Because MCP endpoints can influence future agent behavior and data flow, writing this file is a meaningful persistence mechanism and not a harmless configuration tweak.

Content

Scanner excerpt · install.sh (reported line 162)May include surrounding context.

sh
fi
done <<EOF
$HOME/.cursor/mcp.json|url
$HOME/.codeium/windsurf/mcp_config.json|serverUrl
$HOME/.gemini/settings.json|httpUrl
EOF

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
96% confidence
Finding

The installer targets ~/.gemini/settings.json, another sensitive agent configuration location, to persist registration of a remote MCP server. Modifying such files broadens long-term trust boundaries and may cause the user's agent to connect to external infrastructure in future sessions without renewed consent.

Content

Scanner excerpt · install.sh (reported line 163)May include surrounding context.

sh
done <<EOF
$HOME/.cursor/mcp.json|url
$HOME/.codeium/windsurf/mcp_config.json|serverUrl
$HOME/.gemini/settings.json|httpUrl
EOF

# VS Code / Copilot uses the same file with a "servers" key instead.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill declares no explicit tool scope or allowed-tools, yet its documented setup requires executing a local shell script that modifies agent configuration across multiple tools. Lack of scope constraints increases the chance an agent or user will invoke broader local capabilities than expected, especially because the skill presents itself primarily as a flight-search helper rather than an installer/config-modifier.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation description includes broad phrases like 'planning the flying leg of a trip' and 'comparing airlines for travel dates,' which are not tightly scoped trigger conditions and could match ordinary conversation beyond an explicit request to search live fares. The file does not provide exclusion conditions or negative examples to clarify when the skill should not activate.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The installer performs persistent system changes by registering a remote MCP server across local agent configurations, which exceeds the narrow expectation set by a flight-search skill description. Even if openly documented in comments, this broad install-time reconfiguration creates a trust and scope-expansion risk because users may not expect one skill to modify multiple agent environments.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

Creating ~/.codex and appending MCP server settings establishes persistent state that survives the installation session. Persistent registration of a remote tool server increases risk because future agent runs may automatically expose capabilities or route requests to that external service without the user remembering the original change.

Content

Scanner excerpt · install.sh (reported line 120)May include surrounding context.

sh
return 0
  fi
  [ -f "$file" ] && [ ! -f "$file.bak" ] && cp "$file" "$file.bak"
  mkdir -p "$HOME/.codex"
  {
    echo
    echo "[mcp_servers.${MCP_NAME}]"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script enumerates and updates configuration for multiple agent applications (claude, Cursor, Windsurf, Gemini, VS Code/Copilot, Codex) on the host. Cross-application persistence materially increases blast radius: compromise of the referenced MCP endpoint, or simple user misunderstanding, would affect many tools at once and create durable remote-tool availability beyond the claimed skill purpose.

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 · install.sh (reported line 189)May include surrounding context.

sh
echo
say "Done. Restart your agent so it picks up the new server."
say "Verify with: curl -s -X POST $MCP_URL -H 'content-type: application/json' \\"
say "  -H 'accept: application/json, text/event-stream' \\"
say "  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}'"

Static analysis

No suspicious patterns detected.