Back to skill

Security audit

TencentCloud General OCR

Security checks for vulnerabilities and agentic risk

Overview

This Tencent Cloud OCR skill is mostly coherent, but it can upload any readable local file passed as an image path to Tencent Cloud without validating that it is actually an image.

Review before installing. Use this skill only for images you are comfortable sending to Tencent Cloud under your Tencent account, and avoid passing arbitrary local paths or sensitive documents unless you have verified they are intended image inputs. Prefer a pinned SDK version and consider adding image-type validation plus an explicit upload confirmation step.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:57
Finding

Arbitrary Local Files Can Be Uploaded Without Image Validation

Content
View full analysis
MAX_IMAGE_SIZE_BYTES: print( f"Error: Image file exceeds the " f"{MAX_IMAGE_SIZE_BYTES // (1024 * 1024)}MB limit", file=sys.stderr, ) sys.exit(1) encoded = base64.b64encode(raw).decode("utf-8") return encoded ``` The returned content is subsequently assigned directly to the OCR request: ```python elif args.image_base64: req.ImageBase64 = load_image_base64(args.image_base64) ``` ### Technical Analysis The `--image-base64` argument accepts either Base64 data or an arbitrary local file path. When the supplied value points to an existing file, the script reads the complete file and sends its Base64 representation to Tencent Cloud through the OCR request. The implementation only applies a size limit. It does not verify that the selected file is a supported PNG, JPEG, or BMP image through magic-byte inspection or trusted image decoding. It also accepts any syntactically valid Base64 text file without verifying that the decoded bytes represent an image. Base64 encoding does not protect confidentiality; it merely changes the representation of the source bytes. Consequently, a non-image file containing credentials, configuration, tokens, or other private information can be encoded and transmitted to the external OCR service. This behavior is related to the declared OCR function beca ...[truncated 1525 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:31
Finding

Unpinned Runtime Dependency Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill requires access to environment variables containing cloud API credentials, but it does not declare any explicit tool scope or permissions boundary. This weakens least-privilege controls and makes credential use opaque to reviewers and orchestrators, increasing the chance of unintended secret access or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill describes OCR functionality and required credentials but does not warn that image contents will be transmitted to an external cloud provider and processed using account-linked API keys. Users may unknowingly expose sensitive images, IDs, ads, or embedded personal/business data to a third party without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation criteria are very broad, including essentially any OCR-related request, which can cause the skill to trigger in situations where users did not intend to send images or extracted text to Tencent Cloud. Overbroad routing increases the risk of unnecessary third-party data disclosure and accidental credential-backed API usage.

Content

No source excerpt is available for this finding.