Back to skill

Security audit

Paperless-ngx

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Paperless-ngx connector, but its setup instructions tell an agent to run an unverified internet installer directly in a shell.

Review the setup path before installing. Prefer installing the oo CLI from verified vendor documentation or a signed/package-manager source, and do not let an agent run the pipe-to-shell commands automatically. Once installed, only grant the connected Paperless-ngx account the permissions you actually want the agent to use, especially for deletion, user management, public share links, email, and profile changes.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:193
Finding
Unverified Remote Installer Scripts Executed Directly by Shells## Vulnerability Details **File Location**: `SKILL.md`, lines 193–197 **Vulnerability Type**: Unverified remote payload retrieval and execution **Risk Level**: High ```bash curl -fsSL https://cli.oomol.com/install.sh | bash # macOS / Linux ``` ```powershell irm https://cli.oomol.com/install.ps1 | iex # Windows PowerShell ``` ### Technical Analysis The first-time setup instructions pipe mutable remote content directly into Bash or PowerShell. Neither installation path pins a release version, verifies a cryptographic checksum or publisher signature, nor gives the user an opportunity to inspect the downloaded script before executing it. HTTPS protects the connection in transit but does not establish that the retrieved script is safe. A compromise of the hosting service, publishing account, DNS or certificate infrastructure, or installer deployment process could replace the script after this Skill has been reviewed. The effective code executed by the Skill is therefore controlled remotely and can change without any corresponding change to the audited project. The installation behavior is related to the declared connector functionality, but immediate execution of unverified remote content exceeds the minimum privilege and trust necessary to install the CLI safely. The Windows `Invoke-Expression` pattern and Unix pipe-to-shell pattern both convert downloaded text directly into executable instructions. ### Attack Path 1. The `oo` CLI is unavailable and an action fails with `oo: command not found`. 2. The Agent follows the first-time setup instructions in `SKILL.md`. 3. An attacker compromises or gains control over the installer response served by `cli.oomol.com`, or otherwise causes a malicious response to be accepted. 4. `curl` or `Invoke-RestMethod` retrieves the attacker-controlled script. 5. Bash or `Invoke-Expression` executes the response immediately without integrity verification or review. 6. The payl ...[truncated 1163 chars]
Remediation
## Remediation Suggestions 1. Remove both direct execution patterns: - Do not pipe `curl` output into Bash. - Do not pass `Invoke-RestMethod` output to `Invoke-Expression`. 2. Prefer installation through a trusted operating-system package manager or an officially signed, version-pinned release package. 3. If a script installer is unavoidable: - Pin the installer to an immutable release version. - Download it to a local file without executing it. - Verify a documented SHA-256 or stronger digest obtained through an independently authenticated channel. - Verify a publisher signature against a pinned, documented signing identity. - Reject the installation if any verification fails. - Allow the user to inspect the downloaded file. - Obtain explicit user confirmation before execution. 4. Run the installer with the least-privileged user account and avoid requesting administrative privileges unless a documented installation step strictly requires them. 5. Document the files, directories, network endpoints, and configuration changes made by the installer. 6. Prefer instructions such as the following conceptual sequence rather than pipe-to-shell execution: ```bash curl -fL --output oo-install.sh "https://trusted.example/releases/vX.Y.Z/install.sh" echo "PINNED_SHA256 oo-install.sh" | sha256sum --check - less oo-install.sh bash oo-install.sh ``` The real remediation must use an official immutable artifact and a checksum or signature published and maintained by the vendor; the placeholder values above must not be used as-is.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

External Script Fetching

High
Category
Supply Chain
Content
- **`oo: command not found`** — install the oo CLI (other platforms: <https://cli.oomol.com/install-guide.md>):

  ```bash
  curl -fsSL https://cli.oomol.com/install.sh | bash    # macOS / Linux
  ```

  ```powershell
Confidence
96% confidence
Finding
The skill instructs use of a remote install command that pipes a network-fetched script directly into a shell. If the install endpoint, transport path, or hosting account were compromised, arbitrary code would execute on the user's machine immediately, making this a classic supply-chain and remote code execution risk.

Vague Triggers

Medium
Confidence
97% confidence
Finding
Line L003 says to use this skill for "ANY Paperless-ngx request" and "Whenever a task involves Paperless-ngx," which is an extremely broad activation condition. It does not define boundaries, exclusions, or negative examples, so the skill could be invoked for loosely related requests beyond its intended scope.

Static analysis

No suspicious patterns detected.