Back to skill

Security audit

Infoxmed Qr Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it handles an API password in unsafe ways that could expose it beyond the QR-generation task.

Review before installing. Use only if you trust the Infoxmed endpoint and understand that the skill generates membership activation QR codes. Do not paste the API password into chat, do not let the agent write it into shell profiles or persistent user environment variables, and prefer a secure secret manager or temporary environment variable. Treat any password previously used with this workflow as potentially exposed and rotate it if logs, transcripts, or shell profiles may have captured it.

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

Error
Location
SKILL.md:36
Finding
API Credential Exposed Through Terminal Output, Plaintext Persistence, and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:36-43`, `SKILL.md:50-82`, and `SKILL.md:118-132` **Vulnerability Type**: Insecure credential handling and plaintext sensitive-data exposure **Risk Level**: High ### Vulnerable Code Credential presence is checked by printing its value: ```bash echo $INFOXMED_VIP_PASSWORD ``` ```powershell echo $env:INFOXMED_VIP_PASSWORD ``` The user is instructed to provide the password through the conversation, after which it is persisted in plaintext: ```bash # Detect shell profile if [ -n "$ZSH_VERSION" ] || [[ "$SHELL" == */zsh ]]; then PROFILE="$HOME/.zshrc" elif [ -n "$BASH_VERSION" ] || [[ "$SHELL" == */bash ]]; then PROFILE="$HOME/.bashrc" elif [[ "$SHELL" == */fish ]]; then PROFILE="$HOME/.config/fish/config.fish" else PROFILE="$HOME/.profile" fi # Write to profile (fish uses different syntax) if [[ "$SHELL" == */fish ]]; then echo 'set -gx INFOXMED_VIP_PASSWORD "USER_PROVIDED_PASSWORD"' >> "$PROFILE" else echo '' >> "$PROFILE" echo '# Infoxmed VIP QR API password' >> "$PROFILE" echo 'export INFOXMED_VIP_PASSWORD="USER_PROVIDED_PASSWORD"' >> "$PROFILE" fi # Set for current session export INFOXMED_VIP_PASSWORD="USER_PROVIDED_PASSWORD" ``` ```powershell # Set permanently for current user (persists across reboots) [System.Environment]::SetEnvironmentVariable("INFOXMED_VIP_PASSWORD", "USER_PROVIDED_PASSWORD", "User") # Set for current session $env:INFOXMED_VIP_PASSWORD = "USER_PROVIDED_PASSWORD" ``` The credential is then included directly in the request URL: ```bash curl -s -o /tmp/vip_qr_{timestamp}.zip \ "https://api.infox-med.com/system/batchGenerateVipQr?password=${INFOXMED_VIP_PASSWORD}&agent={url_encoded_agent}&count=1&cardName={url_encoded_cardName}&vipCarType={vipCarType}&times={times}" \ -H "Origin: https://admin.infox-med.com" \ -H "Referer: https://admin.infox-med.com/" ``` ```powershell Invoke-WebRequest -Uri "https://api.infox-med.com/system/batchGenerateVipQr?pa ...[truncated 3190 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Check only whether the variable exists.** Do not print its value: ```bash if [ -z "${INFOXMED_VIP_PASSWORD:-}" ]; then echo "INFOXMED_VIP_PASSWORD is not configured." exit 1 fi ``` ```powershell if ([string]::IsNullOrWhiteSpace($env:INFOXMED_VIP_PASSWORD)) { throw "INFOXMED_VIP_PASSWORD is not configured." } ``` 2. **Do not request secrets through ordinary chat.** Direct users to configure the credential outside the agent conversation, or use a platform-provided secret-input mechanism that prevents the value from entering transcripts and tool logs. 3. **Use secure credential storage.** Prefer an operating-system credential manager, a dedicated secret manager, or a permission-restricted credential file. Do not automatically append plaintext secrets to `.bashrc`, `.zshrc`, `.profile`, or Fish configuration files. 4. **Remove credentials from query strings.** Update the API to accept authentication in an authorization header, for example: ```bash curl --fail --silent --show-error \ -H "Authorization: Bearer ${INFOXMED_VIP_PASSWORD}" \ --get "https://api.infox-med.com/system/batchGenerateVipQr" \ --data-urlencode "agent=${agent}" \ --data-urlencode "count=1" \ --data-urlencode "cardName=${cardName}" \ --data-urlencode "vipCarType=${vipCarType}" \ --data-urlencode "times=${times}" \ -o "$output_file" ``` If the API cannot immediately be changed, ensure query strings are redacted in client, gateway, proxy, monitoring, and server logs, while treating this only as an interim mitigation. 5. **Prevent command and transcript disclosure.** Avoid execution modes that echo expanded commands, ensure error output cannot reproduce the authenticated URL, and configure all relevant logging systems to redact the password. 6. **Rotate exposed credentials.** Any password previously used with the documented workflow should be rotated after the sa ...[truncated 384 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (12)

Ssd 3

High
Confidence
99% confidence
Finding
The skill explicitly instructs the agent to solicit the user's API password in natural language, creating a direct secret-collection channel through chat. This is dangerous because conversational interfaces are often logged, reviewed, or retained, and the collected credential can then be misused or exposed beyond the immediate task.

Ssd 3

High
Confidence
98% confidence
Finding
The setup flow tells the agent to write the user-provided password into shell profiles and environment variables, which broadens the credential's exposure window and storage locations. That persistence makes compromise more likely through local file reads, configuration sync, backups, or unrelated tooling that can inspect environment settings.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The skill description and usage instructions are written as Chinese-only operational guidance, indicating a fixed language/locale expectation. There is no statement that users may choose another language or that the Chinese-only constraint is required for a documented region-specific purpose.

External Transmission

Medium
Category
Data Exfiltration
Content
## Features
- 解析医院、商务渠道人、卡类型、扫码次数等参数
- 自动校验并配置 `INFOXMED_VIP_PASSWORD`
- 调用 `https://api.infox-med.com/system/batchGenerateVipQr` 批量生成激活二维码并保存为压缩包
- 生成过程前先回显参数,方便复核

## Prerequisites
Confidence
88% confidence
Finding
The skill is explicitly designed to send user-supplied hospital/channel/card data plus a credential-backed request to an external domain, which is a real security-relevant behavior that can expose sensitive operational data if users are unaware or if the endpoint is misconfigured or compromised. In this context, external transmission is expected functionality, but the risk remains because the README does not describe data classification, consent, transport expectations, or safeguards around the secret and destination.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The README states that hospital/member-related parameters and a credential-backed password are used to call an external API and that generated ZIP files are written to local temporary storage, but it does not clearly warn users about data disclosure, sensitive file persistence, or local access risks. In this skill context, the data appears business- and membership-related rather than arbitrary public data, so undocumented transmission and storage meaningfully increase privacy and operational risk.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The skill directs the agent to collect an API password from the user and persist it in shell profiles or the Windows user environment, which is broader than necessary for a one-time QR-generation task. Persisting secrets in profile files increases their exposure to other local processes, accidental disclosure, backups, terminal history, and future sessions without clear user consent or minimization.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs persistent storage of a user-provided API password but does not clearly warn that the credential will be written to long-lived local configuration. Users may unknowingly authorize broad, durable exposure of a sensitive secret, which can later be accessed by other tools, users, or malware on the machine.

External Transmission

Medium
Category
Data Exfiltration
Content
**macOS / Linux:**
```bash
curl -s -o /tmp/vip_qr_{timestamp}.zip \
  "https://api.infox-med.com/system/batchGenerateVipQr?password=${INFOXMED_VIP_PASSWORD}&agent={url_encoded_agent}&count=1&cardName={url_encoded_cardName}&vipCarType={vipCarType}&times={times}" \
  -H "Origin: https://admin.infox-med.com" \
  -H "Referer: https://admin.infox-med.com/"
```
Confidence
92% confidence
Finding
The skill transmits sensitive business parameters and an API password to an external service, and the password is placed in the URL query string. Even over HTTPS, query parameters are more likely to leak via logs, proxies, monitoring systems, browser/history equivalents, or error messages than secrets sent in headers or request bodies.

External Transmission

Medium
Category
Data Exfiltration
Content
**Windows (PowerShell):**
```powershell
Invoke-WebRequest -Uri "https://api.infox-med.com/system/batchGenerateVipQr?password=$env:INFOXMED_VIP_PASSWORD&agent={url_encoded_agent}&count=1&cardName={url_encoded_cardName}&vipCarType={vipCarType}&times={times}" `
  -Headers @{ "Origin" = "https://admin.infox-med.com"; "Referer" = "https://admin.infox-med.com/" } `
  -OutFile "$env:TEMP\vip_qr_{timestamp}.zip"
```
Confidence
92% confidence
Finding
This PowerShell variant also sends the API password to an external service in the request URL, creating the same leakage risk through command logging, diagnostics, proxy logs, and other telemetry. The skill context makes this more sensitive because the agent is handling a credential it may have just collected from the user and then immediately exfiltrating it off-host.

External Transmission

Medium
Category
Data Exfiltration
Content
**API call:**
```
GET https://api.infox-med.com/system/batchGenerateVipQr?password=${INFOXMED_VIP_PASSWORD}&agent=商务二部%20蔡宏-宜兴市人民医院&count=1&cardName=半年卡&vipCarType=2&times=1000
```
Confidence
88% confidence
Finding
The example API call demonstrates the same insecure pattern of placing a secret in a URL, reinforcing unsafe implementation and increasing the likelihood that downstream users or agents will reproduce it. As documentation, it still contributes to credential exposure risk by normalizing a bad security practice.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The overview states that the returned ZIP file is saved locally, but there is no user-facing warning in the operational steps that local file creation will occur or where the file will be written. Because the skill affects user data storage on the local system, the behavior should be clearly disclosed as a warning or explicit notice.

Context-Inappropriate Capability

Low
Confidence
89% confidence
Finding
The platform detection and shell/profile modification logic materially expands the skill's behavior from QR generation into local system configuration. That added capability is dangerous because it enables unauthorized persistence changes and credential handling on the host, increasing attack surface far beyond the stated business function.

Static analysis

No suspicious patterns detected.