CVE-2026-103663: Path Traversal leading to Remote Code Execution in Ollama

Published Oct 8, 2026
·
Updated

Ollama is vulnerable to path traversal in the /api/pull endpoint due to insufficient validation of layer digests by the digestToPath function. An unauthenticated remote attacker can specify a path traversal sequence as a layer digest, causing a malicious binary to be written outside the model store.

Critically if the server process has write access to /usr/lib/ollama (the default in most Ollama Docker images), an attacker can write the malicious file to that directory. On the next server restart, the file is loaded and executed, resulting in remote code execution as root.

This issue was fixed in version 0.35.0.

Affected Software

1 affected component
Ollama Ollama<0.35.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Ollama to a version that resolves this vulnerability.

    Fixed in 0.35.0

Event History

Oct 8, 2026
CVE Published
via MITRE·01:19 PM
Data Sourced
via MITRE·01:19 PM
DescriptionWeakness
Data Sourced
via NVD·02:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are most exposed to root-level code execution?

Deployments where the Ollama server process can write to /usr/lib/ollama are at particular risk. This write access is described as the default in most Ollama Docker images.

2

What does an attacker need to exploit this issue?

An attacker needs remote access to the /api/pull endpoint and does not need authentication. They can supply a path traversal sequence as a layer digest to write a malicious binary outside the model store.

3

When would the malicious file execute?

The malicious file is loaded and executed on the next server restart. In the described writable /usr/lib/ollama scenario, it executes as root.

4

What version contains the fix?

The issue was fixed in Ollama version 0.35.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203