Back to skill

Security audit

File Uploader

Security checks for vulnerabilities and agentic risk

Overview

This uploader is purpose-aligned, but it sends uploaded files and its authentication token over unencrypted HTTP, so it needs review before use.

Use this only for files you intend to publish. Before installing or running it, the uploader should preserve and require HTTPS for the Bridge URL, use a least-privilege token, and preferably pin its Python dependency in a reproducible requirements file.

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

Error
Location
scripts/upload_media.py:24
Finding
Bearer Token and Uploaded File Exposed Through Forced Plaintext HTTP## Vulnerability Details **File Location**: `scripts/upload_media.py`, lines 24-53 **Vulnerability Type**: Plaintext transmission of credentials and user-selected file contents **Risk Level**: High **Vulnerable Code**: ```python bridge = config["plugins"]["entries"]["astron-claw"]["config"]["bridge"] host = urlparse(bridge["url"]).netloc token = bridge["token"] return {"host": host, "token": token} ``` ```python url = f"http://{config['host']}/api/media/upload" filename = os.path.basename(file_path) with open(file_path, "rb") as f: resp = requests.post( url, headers={"Authorization": f"Bearer {config['token']}"}, files={"file": (filename, f)}, data={"sessionId": session_id} if session_id else {}, ) ``` ### Technical Analysis The script parses the configured bridge URL but preserves only its network location. It then reconstructs the upload endpoint with a hardcoded `http://` scheme. This discards any configured HTTPS scheme and forces the bearer token, uploaded file, filename, and optional session identifier to travel over an unencrypted connection. Because bearer tokens grant access to whoever possesses them, an attacker who can observe the network traffic can reuse the captured token without needing additional authentication. An active network attacker can also modify requests or responses, including substituting the returned public download URL. Reading a bridge credential and transmitting a caller-selected file are relevant to the declared authenticated-upload function. However, transmitting them over plaintext HTTP is not necessary and fails least-security expectations. ### Attack Path 1. A user invokes the Skill with a local file to upload. 2. The script reads the Astron Claw Bridge bearer token from `/root/.openclaw/openclaw.json`. 3. Even if the configured bridge URL uses HTTPS, the script removes that scheme and constructs an HTTP endpoint. 4. T ...[truncated 1203 chars]
Remediation
## Remediation Suggestions - Preserve and validate the configured URL rather than extracting only its network location. - Require HTTPS for every authenticated upload and reject plaintext HTTP configuration. - Reject malformed URLs, credentials embedded in URLs, fragments, and unexpected schemes. - Construct the API endpoint from a validated HTTPS base URL. - Configure a finite connection and response timeout. - Keep TLS certificate verification enabled and do not introduce `verify=False`. - Consider restricting the bridge destination to an explicit allowlist if only known service origins are legitimate. - Avoid printing unrestricted server response bodies on errors because they may contain sensitive diagnostics. - Warn users that uploaded files will become publicly accessible and obtain clear confirmation before uploading sensitive files. Example hardened construction: ```python bridge_url = bridge["url"].rstrip("/") parsed = urlparse(bridge_url) if parsed.scheme != "https" or not parsed.netloc: raise ValueError("Bridge URL must be a valid HTTPS URL") if parsed.username or parsed.password or parsed.fragment: raise ValueError("Bridge URL contains prohibited components") url = f"{bridge_url}/api/media/upload" resp = requests.post( url, headers={"Authorization": f"Bearer {config['token']}"}, files={"file": (filename, f)}, data={"sessionId": session_id} if session_id else {}, timeout=(10, 120), ) ```

T08 · Insecure Dependencies

Warning
Location
SKILL.md:74
Finding
Unpinned Third-Party Dependency Installation Instruction## Vulnerability Details **File Location**: `SKILL.md`, line 74 **Vulnerability Type**: Unpinned and mutable third-party dependency installation **Risk Level**: Medium **Vulnerable Instruction**: ```text - Requires `requests` package: `pip install requests` ``` ### Technical Analysis The documentation instructs users to install `requests` without specifying a reviewed version, hashes, a lock file, or a controlled package source. The resolved package and its transitive dependencies can therefore change over time without any corresponding change to the audited Skill. This creates a supply-chain and reproducibility risk. Installation could retrieve a compromised future release, malicious dependency artifact, or package supplied through a compromised or incorrectly configured package index. The audit found no evidence that `requests` itself is malicious; the issue is the mutable and unverified installation process. ### Attack Path 1. A user follows the Skill documentation and runs `pip install requests`. 2. `pip` resolves the current package and transitive dependencies from its configured index or mirror. 3. An attacker compromises a relevant release, dependency, index, mirror, or local package-manager configuration. 4. The package manager downloads and installs the attacker-controlled artifact because no reviewed version or cryptographic hash is enforced. 5. Malicious package code executes during installation or when the upload script imports the package. ### Impact Assessment Exploitation could execute code with the privileges of the user performing the installation or running the Skill. Depending on those privileges, malicious dependency code could access user files, environment variables, application credentials, and network resources. The potential impact is especially significant if installation is performed as root, but the documentation does not explicitly require or demonstrate privileged installation. Therefo ...[truncated 71 chars]
Remediation
## Remediation Suggestions - Declare a reviewed, exact dependency version in a dedicated requirements file. - Generate and verify cryptographic hashes for the dependency and all transitive dependencies. - Install with hash enforcement, such as: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` - Use a project-specific virtual environment rather than installing into a global or privileged Python environment. - Obtain packages only from an approved HTTPS package index or an internally controlled artifact repository. - Regularly review pinned versions for security updates and regenerate hashes through a controlled update process. - Include the lock or requirements file in the Skill package so that the audited dependency set is reproducible.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (6)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill performs sensitive capabilities—reading local files and sending their contents over the network—but does not declare any tool scope or permission boundary in the skill manifest. That makes the behavior less transparent to reviewers and users, increasing the chance of unintended data exfiltration through normal-looking skill usage.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill advertises uploading a local file and returning a public URL, but it does not clearly warn that the file's contents leave the local environment and become publicly accessible. In practice, this can lead users to upload sensitive local documents, screenshots, or media without understanding the confidentiality impact.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The manifest says the skill uploads a local file and returns a public download URL. While network upload is expected, automatically reading credentials and endpoint details from /root/.openclaw/openclaw.json introduces privileged local configuration access that is not justified by the narrow stated purpose and is not disclosed in the description.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The script sends file contents and session metadata to an endpoint constructed as plain HTTP, so the upload and bearer token transit the network without transport encryption. An attacker on the network path could intercept or modify the uploaded content, steal the token, or tamper with the server response, making this materially dangerous in an uploader skill whose core action is network exfiltration of local files.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The documentation states that host and token are automatically read from a local config file, but it does not warn that stored credentials will be used to authenticate remote uploads. This reduces user awareness of credential use and can obscure the trust boundary between local secrets and external network actions.

Missing User Warnings

Low
Confidence
81% confidence
Finding
The script automatically reads a bearer token from /root/.openclaw/openclaw.json and uses it for authentication, but it does not disclose this credential access to the user beyond a brief note that host and token are auto-read. For safety-sensitive code, accessing credentials should be clearly documented so users understand what secrets are being consumed.

Static analysis

No suspicious patterns detected.