Back to skill

Security audit

Ollama Manager

Security checks for vulnerabilities and agentic risk

Overview

This skill is a clearly disclosed Ollama fleet-management guide, with some normal operational risks around installing an external package and managing large local models.

Install only if you trust the `ollama-herd` package and its publisher. Prefer a virtual environment, avoid administrative privileges, review the package source or pin a known version, and require explicit confirmation before any pull or delete action because models can consume or remove large amounts of disk space.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:22
Finding

Unpinned Third-Party Package Installation and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22-26
Vulnerability Type: Unpinned and unverifiable third-party dependency
Risk Level: Medium

Vulnerable Code

bash
pip install ollama-herd           # install the Ollama management toolkit
herd                              # start the Ollama router (tracks all your Ollama machines)
herd-node                         # run on each Ollama machine you want to manage

Technical Analysis

The installation command retrieves the latest available ollama-herd package from the configured Python package index without specifying an exact version, package hash, lockfile, or reviewed source commit. The newly installed herd and herd-node entry points are then executed.

This creates a supply-chain trust boundary that cannot be assessed from the Skill package itself. A future package release, compromised maintainer account, compromised package-index account, or malicious package served through a modified Python index configuration could introduce arbitrary code. Python packages may execute code during installation or when their command-line entry points are launched.

The dependency requires access appropriate for managing Ollama machines and local fleet data, but installation and execution grant the package all permissions held by the invoking operating-system user. This is broader than merely making constrained requests to the documented localhost API.

The separately flagged commands at lines 38, 46, and 54 are not curl | bash execution chains. They send localhost JSON responses to python3 -m json.tool for formatting and do not dynamically execute the received content.

Attack Path

  1. An attacker compromises the ollama-herd package publisher, release workflow, package-index account, or an index configured in the user's Python environment.
  2. The attacker publishes a modified package under the expected package name or replaces the version se ...[truncated 1374 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to an explicitly reviewed release, for example:
    bash
    python3 -m pip install "ollama-herd==<reviewed-version>"
    
  2. Publish trusted SHA-256 hashes and require hash verification through a requirements file:
    text
    ollama-herd==<reviewed-version> \
        --hash=sha256:<verified-package-hash>
    
    Install it with:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Link the pinned package version to a reviewed source commit and document how the distributed artifact was built.
  4. Recommend installation inside an isolated virtual environment rather than the system Python environment.
  5. Run herd and herd-node under a dedicated, minimally privileged operating-system account with access only to required Ollama endpoints and data paths.
  6. Avoid granting administrative privileges during installation or execution.
  7. Where feasible, require signed release artifacts and verify signatures before installation.
  8. Document the package's required filesystem, network, and fleet permissions so operators can enforce least-privilege controls.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (9)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

Every Ollama model available across all machines

bash
# ollama_all_models — list every Ollama model on every node
curl -s http://localhost:11435/api/tags | python3 -m json.tool

Shows every Ollama model on every machine with sizes and which nodes have them.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

What Ollama models are actually loaded in GPU memory right now

bash
# ollama_hot_models — Ollama models ready to serve instantly
curl -s http://localhost:11435/api/ps | python3 -m json.tool

These are the "hot" Ollama models — ready to serve instantly. Everything else is cold on disk and needs Ollama loading time.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

Per-machine Ollama breakdown with disk usage

bash
# ollama_disk_usage — per-node Ollama model sizes
curl -s http://localhost:11435/dashboard/api/model-management | python3 -m json.tool

The real picture: Ollama model sizes, last-used timestamps, which machines have which Ollama models, and how much disk each is eating.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

Per-machine Ollama breakdown with disk usage

bash
# ollama_disk_usage — per-node Ollama model sizes
curl -s http://localhost:11435/dashboard/api/model-management | python3 -m json.tool

The real picture: Ollama model sizes, last-used timestamps, which machines have which Ollama models, and how much disk each is eating.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

What Ollama models should I be running?

bash
# ollama_recommendations — optimal Ollama model mix per node
curl -s http://localhost:11435/dashboard/api/recommendations | python3 -m json.tool

AI-powered Ollama recommendations based on your actual hardware — RAM, cores, GPU memory. Tells you which Ollama models fit, which are too big, and the optimal Ollama model mix for your machines. Includes estimated RAM requirements and Ollama benchmark data.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

Pull an Ollama model to a specific machine

bash
# ollama_pull — download an Ollama model to a node
curl -s -X POST http://localhost:11435/dashboard/api/pull \
  -H "Content-Type: application/json" \
  -d '{"model": "llama3.3:70b", "node_id": "mac-studio"}'

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

curl -s http://localhost:11435/dashboard/api/settings | python3 -c "import sys,json; print(json.load(sys.stdin)['config']['toggles'])"

Toggle Ollama auto-pull off

curl -s -X POST http://localhost:11435/dashboard/api/settings
-H "Content-Type: application/json"
-d '{"auto_pull": false}'

text

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 · SKILL.md (reported line 109)May include surrounding context.

Pull an Ollama model to a specific machine

bash
# ollama_pull — download an Ollama model to a node
curl -s -X POST http://localhost:11435/dashboard/api/pull \
  -H "Content-Type: application/json" \
  -d '{"model": "llama3.3:70b", "node_id": "mac-studio"}'

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 · SKILL.md (reported line 131)May include surrounding context.

curl -s http://localhost:11435/dashboard/api/settings | python3 -c "import sys,json; print(json.load(sys.stdin)['config']['toggles'])"

Toggle Ollama auto-pull off

curl -s -X POST http://localhost:11435/dashboard/api/settings
-H "Content-Type: application/json"
-d '{"auto_pull": false}'

text