[GH-ISSUE #15485] server/images: blob hash verification skipped when config and layer share the same digest, leads to SSRF response exfiltration #9900

Open
opened 2026-04-12 22:45:07 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @davidrxchester on GitHub (Apr 10, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15485

What is the issue?

When a manifest contains a config and layer with the same digest, the skipVerify map in PullModel overwrites the false value (set when the layer downloads) with true (set when the config is found already on disk). This causes verifyBlob to be skipped for both entries.

A rogue OCI registry can exploit this by serving a manifest with duplicate digests and redirecting blob downloads via 307 to internal endpoints. The SSRF response is written to disk as a blob, hash verification is skipped due to the map collision, and the blob persists. The attacker can then exfiltrate the response using /api/copy and /api/push.

This would prevent CVE-2026-5530 by preventing arbitrary 307 redirect fetches from being stored on disk.

Relevant log output


OS

macOS

GPU

Apple

CPU

No response

Ollama version

0.20.2

Originally created by @davidrxchester on GitHub (Apr 10, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15485 ### What is the issue? When a manifest contains a config and layer with the same digest, the skipVerify map in PullModel overwrites the false value (set when the layer downloads) with true (set when the config is found already on disk). This causes verifyBlob to be skipped for both entries. A rogue OCI registry can exploit this by serving a manifest with duplicate digests and redirecting blob downloads via 307 to internal endpoints. The SSRF response is written to disk as a blob, hash verification is skipped due to the map collision, and the blob persists. The attacker can then exfiltrate the response using /api/copy and /api/push. This would prevent CVE-2026-5530 by preventing arbitrary 307 redirect fetches from being stored on disk. ### Relevant log output ```shell ``` ### OS macOS ### GPU Apple ### CPU _No response_ ### Ollama version 0.20.2
GiteaMirror added the bug label 2026-04-12 22:45:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#9900