Back to skill

Security audit

Calibre Converter

Security checks for vulnerabilities and agentic risk

Overview

The skill's converter goal is understandable, but the bundled Calibre gateway adds persistent, broad local-library, network, and credential-handling behavior with real scoping weaknesses.

Install only if you intend to run and administer a local Calibre gateway, keep it bound to loopback, require a strong API key, avoid exposing it on a network, and patch or disable arbitrary download URLs, manual server file paths, dashboard API-key storage/query transport, and unpinned dependencies before broader use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
calibre-openclaw-gateway/app/services/download_service.py:99
Finding

Server-Side Request Forgery Through Unrestricted Download URLs

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
calibre-openclaw-gateway/app/api/routes/downloads.py:425
Finding

Arbitrary Local File Access Through Manual Download Registration

Content
View full analysis
Optional[str]: try: sha256_hash = hashlib.sha256() with open(file_path, "rb") as f: ...[truncated 2257 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/calibre_converter_client.py:75
Finding

Bearer API Key Can Be Sent Over Plaintext or to an Untrusted Destination

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
calibre-openclaw-gateway/requirements.txt:1
Finding

Unpinned Dependencies and Mutable Git Dependency Create Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (201)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/README.md (reported line 773)May include surrounding context.

bash
rsync -avc \
  --exclude '.env' \
  --exclude '.venv/' \
  --exclude 'logs/' \
  --exclude '__pycache__/' \

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · calibre-openclaw-gateway/app/api/routes/websocket.py (reported line 33)May include surrounding context.

python
logger.info(f"WebSocket disconnected. Total connections: {len(self.active_connections)}")
    
    async def send_personal_message(self, message: str, websocket: WebSocket):
        """Send message to a specific WebSocket, checking if still connected."""
        try:
            if websocket.client_state.name != 'DISCONNECTED':
                await websocket.send_text(message)

Unvalidated Output Injection

High
Category
Output Handling
Confidence
97% confidence
Finding

The catalog search renderer builds HTML with innerHTML from server-returned book metadata and includes fields such as problem tags and badge fragments that are not consistently escaped before insertion. Because this dashboard displays untrusted catalog/OpenLibrary content, a malicious title, author, URL, or problem string could trigger DOM-based or stored XSS and steal the API key from localStorage or perform authenticated actions in the user’s browser.

Content

Scanner excerpt · calibre-openclaw-gateway/app/dashboard.html (reported line 1919)May include surrounding context.

html
}
                statusEl.textContent = statusText;

                resultsEl.innerHTML = results.map(item => {
                    if (item.result_type === 'openlibrary') {
                        // OpenLibrary result - display with link to OpenLibrary
                        const title = item.title || 'Untitled';

Unvalidated Output Injection

High
Category
Output Handling
Confidence
89% confidence
Finding

Although the main title/citation/content fields are escaped, this renderer still uses innerHTML with composed HTML fragments and tooltip markup, which increases the risk that a newly added or overlooked unescaped field becomes an XSS sink. In a dashboard that handles untrusted book content and stores credentials in the browser, reliance on innerHTML materially raises the blast radius of any escaping mistake.

Content

Scanner excerpt · calibre-openclaw-gateway/app/dashboard.html (reported line 2134)May include surrounding context.

html
statusEl.textContent = `${results.length} result(s) for "${query}".`;

                // Book content is untrusted; escape everything before rendering.
                resultsEl.innerHTML = results.map(r => {
                    const similarity = typeof r.similarity === 'number'
                        ? `${(r.similarity * 100).toFixed(1)}%`
                        : '--';

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

The dashboard stores the API key in localStorage, which is readable by any script executing in the page origin. If an XSS bug or compromised third-party script is present, the key can be exfiltrated and then reused to access protected API endpoints and WebSocket feeds.

Content

Scanner excerpt · calibre-openclaw-gateway/app/dashboard.html (reported line 2334)May include surrounding context.

html
}

        function getApiKey() {
            // Get API key from localStorage
            return localStorage.getItem('calibre_api_key');
        }

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This code retrieves the API key from localStorage and appends it to the WebSocket URL as a query parameter. Query-string credentials are especially dangerous because they can be exposed in browser history, logs, monitoring systems, reverse proxies, and referrer-like telemetry, compounding the theft risk already created by localStorage storage.

Content

Scanner excerpt · calibre-openclaw-gateway/app/dashboard.html (reported line 2366)May include surrounding context.

html
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
            const wsUrl = `${protocol}//${window.location.host}/ws/stats`;

            // Try to get API key from localStorage or prompt user
            let apiKey = localStorage.getItem('calibre_api_key');
            if (!apiKey) {
                // Only prompt if user explicitly wants to provide an API key

Possible Typosquatting: 'uvicorn' resembles popular package 'gunicorn'

High
Category
Supply Chain
Confidence
70% confidence
Finding

Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/app/config.py (reported line 135)May include surrounding context.

python
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/install_service.sh (reported line 64)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/install_service.sh (reported line 74)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/install_service.sh (reported line 81)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/install_service.sh (reported line 87)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run-rag.sh (reported line 41)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run-rag.sh (reported line 47)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 4)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 62)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 72)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 78)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 84)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 88)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 91)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/run.sh (reported line 97)May include surrounding context.

sh
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/scripts/document_semantic_rag.py (reported line 248)May include surrounding context.

python
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · calibre-openclaw-gateway/tests/test_openlibrary_integration.py (reported line 109)May include surrounding context.

python
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/calibre_converter_client.py (reported line 26)May include surrounding context.

python
#!/bin/bash

# Calibre OpenClaw Server - Run Script
# This script checks for .env file and installed dependencies before running the server

set -e