Back to skill

Security audit

kiaaccess-curl

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because its examples can expose account credentials and cause unintended vehicle-control actions.

Have the temporary-file handling corrected before use: keep credentials and vehicle responses in a private temporary directory with restrictive permissions and cleanup. Verify the target vehicle and execute only the explicitly requested command; never run the combined examples wholesale. The saved refresh token enables continued account access. Both bundled files were reviewed, but the referenced external API document and claimed live behavior could not be verified.

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
references/requests.md
Finding

Authentication credentials written to a shared temporary file without restrictive permissions

Content
View full analysis

Impact

A local attacker can steal the session token and impersonate the account while that session remains valid, accessing vehicle information and supported remote commands. The durable refresh token is also disclosed.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The charging-status query matches the declared purpose, but the code also actively controls charging and modifies charge targets. These are substantive vehicle-control capabilities not disclosed by the description's charge-state reads or its listed lock, unlock, and climate commands. The general reference to commanding a vehicle does not clearly disclose these additional charging operations.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Ready-to-run request bodies and `jq` recipes: `references/requests.md`.**

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Source `references/requests.md`'s `kia_headers` helper rather than hand-rolling

Ready-to-run vehicle-control steps lack a warning about their real-world security and operational effects.

High
Category
Output Handling
Confidence
94% confidence
Finding

The ready-to-run command examples place lock and unlock operations consecutively in the same executable block without requiring selection of the intended action. Copying or executing the whole block could leave the vehicle unlocked and also change climate operation, so the concern is unintended physical effects rather than merely missing warning text.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
with `chmod 600`. It is a credential: it re-authenticates the account without a
password prompt.

> Do **not** write it to `~/.kiaaccess-mcp/session.json`. That path belongs to the
> `kiaaccess-mcp` server, whose store is keyed by `accountId` with a different
> schema — overwriting it corrupts the server's session and forces it back
> through MFA.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/requests.md (reported line 12)May include surrounding context.

device id stable.

bash
KIA_BASE='https://api.owners.kia.com/apigw/v1'
: "${KIA_DEVICE:?export KIA_DEVICE=\$(uuidgen) first}"

# Session file for THIS skill. Deliberately NOT ~/.kiaaccess-mcp/session.json —

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/requests.md (reported line 53)May include surrounding context.

md
done
}

# curl wrapper: kia_curl <method> <path> [body] [-- extra-header ...]
kia_curl() {
  local method="$1" path="$2" body="${3:-}"
  shift 2; [ $# -gt 0 ] && shift          # drop the body arg when present

The workflow persists authentication material and vehicle location in temporary files without a privacy warning.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The wrapper writes response headers, including session and durable refresh tokens, to predictable /tmp/kia_hdrs without restrictive creation permissions, while other temporary files retain vehicle identifiers and location. Under common umasks these files can be readable by other local users, and predictable paths also permit precreation or symlink attacks; protecting the final session file does not protect these intermediate copies.

Content

No source excerpt is available for this finding.