Back to skill

Security audit

Online Ocr Skill

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real online OCR utility, but it sends images or image URLs to OCR.space and caches extracted text locally by default without strong privacy controls.

Install only if you are comfortable sending images or image URLs to OCR.space. Do not use it for secrets, IDs, medical, financial, legal, or internal-only documents unless that third-party processing is approved. Prefer running with --no-cache for sensitive content, avoid passing private API keys directly on the command line, and consider pinning dependencies in a virtual environment.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
ocr_cli.py:95
Finding

OCR Results Are Persisted in Plaintext by Default

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
ocr_cli.py:45
Finding

Private API Keys Can Be Exposed Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:22
Finding

Third-Party Dependencies Are Installed Without Version or Integrity Pinning

Content
View full analysis
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 (9)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill performs file reads, file writes, and outbound network requests but does not declare any tool scope or permissions boundary. This can cause an agent or user to invoke the skill without clear visibility into its capabilities, increasing the chance of unintended data access or transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The description presents the skill as a simple OCR utility but does not clearly warn that images and resulting text are sent to a third-party OCR service. In this context, users may unknowingly upload sensitive documents, screenshots, IDs, or credentials to an external processor, creating confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The code sends image data or image URLs to an external service at api.ocr.space, which is an intentional feature but still a security-relevant data exfiltration path. In an OCR skill, this is contextually expected, yet it remains dangerous when users process private or regulated content because third-party transmission changes the trust boundary.

Content

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

md
class OnlineOCR:
    def __init__(self, api_key='helloworld'):  # 免费API密钥
        self.api_key = api_key
        self.api_url = 'https://api.ocr.space/parse/image'
    
    def ocr_from_file(self, image_path, language='chs'):
        """

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file’s docstring, argument descriptions, help examples, and runtime messages are written in Chinese, and the default OCR language is also set to Chinese Simplified. This imposes a specific language/locale on all users without any documented opt-in or alternative interface, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · online_ocr.py (reported line 25)May include surrounding context.

python
- cache_dir: 缓存目录,如果为None则不使用缓存
        """
        self.api_key = api_key
        self.api_url = 'https://api.ocr.space/parse/image'
        self.cache_dir = cache_dir
        
        # 创建缓存目录

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The URL-based OCR path submits a user-supplied image URL to an external service, disclosing both the URL and causing third-party retrieval of the referenced content. This can leak sensitive or internal resource locations and is especially risky if users may pass private, signed, or intranet-accessible URLs without understanding that a third party will receive them.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill sends raw image content to a third-party OCR service, which can expose sensitive data contained in screenshots, IDs, receipts, or documents to an external provider. In this skill context, external transmission is the core feature, but the code provides no explicit user-facing consent, warning, or privacy controls before disclosure, making this a real privacy/security issue rather than a false positive.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The examples write recognized text to local files without warning that OCR output may contain sensitive information extracted from documents or screenshots. This can leave confidential data persisted on disk unexpectedly, where it may be exposed through backups, shared directories, or later processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This Python file contains user-facing natural language that is exclusively Chinese, starting with the module docstring and continuing throughout printed status messages. Under the language/locale policy rule, forcing a specific language without user choice can be a policy violation when the skill does not document that it is intentionally region-specific.

Content

No source excerpt is available for this finding.