Back to skill

Security audit

Cn Qrcode Generator

Security checks for vulnerabilities and agentic risk

Overview

This is a simple QR code generator that uses a disclosed third-party QR service, but users should avoid encoding secrets because the content is sent off-device.

Use this skill only for QR codes that do not contain secrets, credentials, private internal URLs, tokens, or sensitive personal/business data. The QR content is sent to api.qrserver.com to render the image, so users needing confidentiality should prefer a local/offline QR generator.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises execution of a local Python script and use of an external QR API, which implies shell and network capability, but it does not declare any tool scope or permission boundary. This can cause the agent or user to invoke capabilities without clear authorization constraints, increasing the risk of unintended command execution or outbound data transfer.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill states that it uses qrserver.com to generate QR codes but does not clearly warn users that their supplied URL or text is transmitted to a third-party service. If users provide sensitive URLs, tokens, internal addresses, or private text, that data may be exposed externally without informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This tool is presented as a QR code generator, but it actually transmits the user-provided QR payload to a third-party service for rendering. That mismatch is security-relevant because users may reasonably assume sensitive text is processed locally and may unknowingly disclose internal URLs, tokens, or other confidential data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code sends arbitrary user-supplied QR content to an external API without warning, consent, or any confidentiality guidance. In a skill context, this is more dangerous because users may paste secrets, internal hostnames, login links, or business data into a seemingly local utility and silently leak them off-host.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The hardcoded external endpoint means all QR payloads are transmitted to a third-party service. Even over HTTPS, this creates a privacy and compliance risk because the remote provider receives the full encoded content and metadata associated with the request.

Content

Scanner excerpt · generate.py (reported line 21)May include surrounding context.

python
# Google Chart API (qrserver.com) - 全球最稳定的免费QR API
    encoded = urllib.parse.quote(text)
    url = (
        f"https://api.qrserver.com/v1/create-qr-code/"
        f"?size={size}x{size}"
        f"&data={encoded}"
        f"&color={fg_color}"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Using an external network service and a curl subprocess is unnecessary for the stated purpose because QR codes can be generated locally. This expands the attack surface by introducing data exfiltration risk, availability dependence on a third party, and trust in external tooling without clear justification.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · generate.py (reported line 32)May include surrounding context.

python
os.makedirs(os.path.dirname(output) or ".", exist_ok=True)
    try:
        cmd = ["curl", "-s", "--max-time", "15", "-L", "-o", output, url]
        r = subprocess.run(cmd, capture_output=True, text=True, timeout=18)
        if os.path.exists(output) and os.path.getsize(output) > 100:
            return {"text": text, "file": os.path.abspath(output),
                    "size": size, "api": "qrserver.com", "status": "ok"}

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language descriptions and user-visible messages are written only in Chinese, which can impose a specific language without any opt-in or alternative. Under the policy, language constraints should either offer user choice or be clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The tool sends user-supplied content to a third-party QR code generation service instead of generating the QR code locally. This creates a real confidentiality risk because any text encoded into the QR code is disclosed to an external service, which may log or retain the data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

A QR code generator minimally needs to transform text into an image, but this implementation also transmits the full payload to a third-party service. That extra capability exceeds the least-privilege expectation for the skill and can expose secrets, URLs, tokens, or personal data entered by users.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The code makes an outbound request to https://api.qrserver.com/ containing the full text being encoded in the query string. Even with TLS and certificate validation, the destination service still receives the data and may log the request, making this a genuine external data exposure concern.

Content

Scanner excerpt · scripts/qrcode_generator.py (reported line 12)May include surrounding context.

python
SSL标准验证(certifi根证书)
    """
    encoded_text = urllib.parse.quote(text)
    url = f"https://api.qrserver.com/v1/create-qr-code/?size={size}x{size}&margin={margin}&format={format}&data={encoded_text}"
    
    headers = {
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code transmits user-provided text over the network to an external QR API without any user-facing warning, consent, or disclosure. Users may reasonably assume a local utility does not exfiltrate their content, so this hidden transmission increases the chance of accidental leakage of sensitive data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill name, description, and usage documentation are entirely presented in Chinese, but there is no indication that the skill is intended only for a Chinese-speaking or China-specific context. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.