Back to skill

Security audit

pickuppatrol-mcp

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent PickUp Patrol shell guide, but it warrants Review because it can change children's live dismissal plans and documents insecure handling of session and student data in temporary files.

Install only if you intentionally want shell-level access to PickUp Patrol from a trusted machine. Treat all outputs as sensitive child and school data, avoid copy-pasting write examples without checking IDs, dates, and transportation options, and add your own confirmation and cleanup steps before using the login or update commands.

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

Warning
Location
SKILL.md:20
Finding
Insecure Temporary Files Expose Authentication Data and Permit Symlink-Based File Overwrites<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 20–29 **Vulnerability Type**: Unsafe temporary-file creation and incomplete cleanup **Risk Level**: Medium ### Vulnerable Code ```bash pup_login() { local jar; jar=$(mktemp -t pupjar) curl -sS -c "$jar" -X POST "$PUP/Authenticate" \ -H 'Content-Type: application/json' \ -d "$(jq -nc --arg u "$PUP_USER" --arg p "$PUP_PASS" \ '{provider:"credentials",UserName:$u,Password:$p,RememberMe:true}')" \ -o /tmp/pup_auth.json -w '%{http_code}' >/tmp/pup_code [ "$(cat /tmp/pup_code)" = 200 ] || { jq -r '.ResponseStatus.Message' /tmp/pup_auth.json >&2; return 1; } export PUP_JAR="$jar" ``` ### Technical Analysis Although the cookie jar is created using `mktemp`, the authentication response and HTTP status are written to predictable, shared paths: `/tmp/pup_auth.json` and `/tmp/pup_code`. Shell redirection and `curl -o` follow symbolic links. A local attacker can therefore pre-create either path as a symbolic link and cause the authenticated user to overwrite another file that the user is permitted to modify. The permissions assigned to the generated files also depend on the user's current `umask`. Under an insufficiently restrictive configuration, another local user may be able to read authentication response data. The response is documented as containing account and session-related fields such as `UserId`, `SessionId`, `UserName`, roles, permissions, and potentially bearer or refresh tokens if the deployment begins issuing them. The securely generated cookie jar is not deleted when the session ends or when login processing fails. It contains active session cookies and consequently remains sensitive for as long as those cookies are valid. ### Attack Path 1. An attacker with local access predicts the documented fixed paths `/tmp/pup_auth.json` and `/tmp/pup_code`. 2. The attacker creates a symbolic link from one of those paths to a file writable by the victim, or moni ...[truncated 1102 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Create a private temporary directory, enforce restrictive permissions, and place every temporary artifact inside it: ```bash pup_login() { local tmp jar auth_file code_file umask 077 tmp=$(mktemp -d -t pup.XXXXXX) || return 1 jar="$tmp/cookies" auth_file="$tmp/auth.json" code_file="$tmp/status" trap 'rm -rf "$tmp"' RETURN curl -sS -c "$jar" -X POST "$PUP/Authenticate" \ -H 'Content-Type: application/json' \ -d "$(jq -nc --arg u "$PUP_USER" --arg p "$PUP_PASS" \ '{provider:"credentials",UserName:$u,Password:$p,RememberMe:true}')" \ -o "$auth_file" -w '%{http_code}' >"$code_file" || return 1 } ``` Because the cookie jar must survive the function when cookie authentication is used, manage it through an explicit session lifecycle rather than deleting it on function return. Recommended controls include: - Create the session directory with `mktemp -d` and mode `0700`. - Set `umask 077` before creating authentication artifacts. - Avoid predictable names directly under `/tmp`. - Add a `pup_logout` or cleanup function that removes the cookie jar and unsets `PUP_JAR`, `PUP_TOKEN`, and `PUP_PASS`. - Install appropriate `EXIT`, `HUP`, `INT`, and `TERM` traps for cleanup. - Delete authentication response and status files immediately after parsing. - Reject any temporary path that is not a regular file owned by the current user. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
references/api.md:139
Finding
Predictable Temporary Files Expose Student Records and Enable Symlink-Based Overwrites<![CDATA[ ## Vulnerability Details **File Location**: `references/api.md`, lines 139–149 **Vulnerability Type**: Unsafe storage of sensitive student data in shared temporary files **Risk Level**: Medium ### Vulnerable Code ```bash STUDENT=1050046 pup GET "GetStudent?StudentId=$STUDENT" > /tmp/pup_student.json # Set Monday (DayId 2) and Tuesday (3) to Bus (41245). jq '.DefaultPlans = ( (.DefaultPlans // []) as $p | [2,3] as $days | ($p | map(select(.DayId as $d | $days | index($d) | not))) + ($days | map({DayId:., TransportationId:41245, TransportationName:"Bus", Note:null})) | sort_by(.DayId))' /tmp/pup_student.json > /tmp/pup_student_new.json pup PUT Student -d @/tmp/pup_student_new.json ``` ### Technical Analysis The documented read-modify-write procedure stores complete student records in the predictable paths `/tmp/pup_student.json` and `/tmp/pup_student_new.json`. These paths are created using ordinary shell redirection rather than secure exclusive creation. A local attacker can pre-create either path as a symbolic link. When the victim follows the documented workflow, shell redirection follows that link and writes with the victim's privileges. The original record and modified record also remain on disk after the operation. The API reference states that a student record can include names, school identifiers and names, teacher identifiers, safety flags, transportation defaults, car numbers, limited-option identifiers, and audit metadata. File readability depends on the victim's `umask`; if permissions are too broad, another local user can read this information. Even when permissions are restrictive, abandoned files remain available to later processes running as the same user. ### Attack Path 1. An attacker with access to the same system observes that the documented procedure always uses `/tmp/pup_student.json` and `/tmp/pup_student_new.json`. 2. The attacker creates one of those paths as a symbolic link to a file wri ...[truncated 963 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Replace fixed paths with files inside a securely created private directory: ```bash umask 077 PUP_TMP=$(mktemp -d -t pup.XXXXXX) || exit 1 trap 'rm -rf "$PUP_TMP"' EXIT HUP INT TERM student_file="$PUP_TMP/student.json" updated_file="$PUP_TMP/student-updated.json" pup GET "GetStudent?StudentId=$STUDENT" >"$student_file" || exit 1 jq '...' "$student_file" >"$updated_file" || exit 1 pup PUT Student -d @"$updated_file" ``` Additional hardening should include: - Ensure the temporary directory is owned by the current user and has mode `0700`. - Set `umask 077` before creating files that contain student data. - Remove temporary records immediately after the API response has been verified. - Where practical, use pipelines or securely managed file descriptors to avoid persistent plaintext files. - Validate command success before submitting the modified record. - Do not reuse temporary files across sessions or users. - Document that these records contain sensitive information concerning minors and must not be retained in shared locations. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

External Transmission

Medium
Category
Data Exfiltration
Content
---
name: pickuppatrol-api
description: "Read and change your children's school dismissal plans on PickUp Patrol (app.pickuppatrol.net) from a shell with curl — students, weekly defaults, day-by-day changes, school cutoff times."
---

# PickUp Patrol from a shell
Confidence
88% confidence
Finding
This skill is explicitly designed to transmit sensitive data and authenticated commands to an external third-party service, including reading child/student information and changing dismissal plans. In context, that external transmission is expected functionality, but it is still security-relevant because it handles family data and can cause real-world safety and operational consequences if invoked unintentionally, with the wrong account, or through prompt-injection-driven misuse.

External Transmission

Medium
Category
Data Exfiltration
Content
## Authentication

```bash
curl -sS -c jar -X POST "$PUP/Authenticate" -H 'Content-Type: application/json' \
  -d '{"provider":"credentials","UserName":"…","Password":"…","RememberMe":true}'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The markdown includes a live authentication example that sends a username and password and writes session cookies to a local cookie jar. Although the file notes that no credentials are recorded, it does not warn users that running these commands will handle sensitive credentials and create authenticated session material on disk.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The document provides concrete PUT/PATCH write DTOs and shell examples that update plans, student records, language settings, terms acceptance, and passwords. While these are clearly write operations, the markdown does not include a prominent warning that these commands alter live account or student data and may be difficult to undo.

Vague Triggers

Low
Confidence
77% confidence
Finding
The description says the skill can be used to read and change school dismissal plans "from a shell with curl," but it does not define specific trigger phrases, scope boundaries, or exclusion conditions. In a markdown skill file, this kind of open-ended description can make activation conditions ambiguous and increase the chance of unintended invocation.

Static analysis

No suspicious patterns detected.