Back to skill

Security audit

Qrcode Tool

Security checks for vulnerabilities and agentic risk

Overview

This is a small QR-code utility with documentation gaps, but no evidence of hidden execution, exfiltration, persistence, or destructive behavior.

Before installing, note that the tool's documentation is incomplete: it can read QR codes from image files, and the advertised ASCII mode does not appear to work. Install any Python dependencies in a virtual environment and prefer pinned versions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
scripts/qr.py:11
Finding
Unpinned Third-Party Dependency Installation Guidance## Vulnerability Details **File Location**: `scripts/qr.py:11-15` and `scripts/qr.py:44-49` **Vulnerability Type**: Unpinned third-party dependencies and unsafe supply-chain guidance **Risk Level**: Medium The script instructs users to install third-party packages directly from the default Python package index without specifying reviewed versions, cryptographic hashes, or a locked dependency manifest. ```python try: import qrcode except ImportError: print("Error: qrcode not installed", file=sys.stderr) print("Install with: pip install qrcode[pil]", file=sys.stderr) sys.exit(1) ``` ```python try: from PIL import Image from pyzbar.pyzbar import decode except ImportError: print("Error: Required libraries not installed", file=sys.stderr) print("Install with: pip install pillow pyzbar", file=sys.stderr) sys.exit(1) ``` ### Technical Analysis Commands such as `pip install qrcode[pil]` and `pip install pillow pyzbar` resolve mutable package releases from the user's configured package index. The project provides no dependency lockfile, exact version constraints, package hashes, or documented provenance verification. This does not prove that the named packages are malicious. However, the installation workflow lacks controls against a compromised upstream release, unsafe future release, package-index substitution, or malicious package returned through an untrusted index configuration. Python packages may run build or installation logic and subsequently execute with the privileges of the user running this tool. ### Attack Path 1. An attacker compromises a referenced package, its maintainer account, its distribution channel, or an index configured in the victim's Python environment. 2. The victim runs the skill without the required dependency installed. 3. The script displays an unrestricted `pip install` command. 4. The victim follows that instruction. 5. `pip` retrieves ...[truncated 788 chars]
Remediation
## Remediation Suggestions 1. Add a reviewed dependency manifest containing exact package versions. 2. Generate and commit cryptographic hashes for all direct and transitive distributions. 3. Install dependencies using a hash-enforcing command such as: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Prefer a lockfile generated through a dependency-management process that records transitive dependencies. 5. Review and update pinned dependencies through a controlled process that includes vulnerability and provenance checks. 6. Instruct users to install dependencies inside an isolated virtual environment rather than a global or privileged Python environment. 7. Avoid directing users to run package installation as an administrator or root user.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The code only partially matches the description. It does generate QR codes from text or URLs and can save them as image files or display them. However, it also includes an additional, undeclared capability: reading/decoding QR codes from image files via the --read option. Conversely, the description claims ASCII art output, but the code does not implement ASCII rendering. Therefore the declared description does not accurately represent the actual behavior.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest states that outputs are available as ASCII art or image files, but generate_qr() only creates an image, saves it to a file, or opens it with img.show(). There is no code path that renders or prints an ASCII representation.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill metadata describes QR-code generation, but the implementation also decodes QR codes from local image files. This undocumented capability expands the tool's effective permissions and behavior, which can mislead users and downstream agents into supplying files they did not expect to be processed. In agent ecosystems, capability mismatch is a security issue because hidden file-reading functionality can be abused for unintended data extraction from images containing embedded secrets or links.

Static analysis

No suspicious patterns detected.