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

Open
opened 2026-05-05 03:09:55 -05:00 by GiteaMirror · 1 comment
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-05-05 03:09:55 -05:00
Author
Owner

@PureBlissAK commented on GitHub (Apr 18, 2026):

🤖 Automated Triage & Analysis Report

Issue: #15485
Analyzed: 2026-04-18T18:20:49.674298

Analysis

  • Type: unknown
  • Severity: medium
  • Components: unknown

Implementation Plan

  • Effort: medium
  • Steps:

This issue has been triaged and marked for implementation.

<!-- gh-comment-id:4274307247 --> @PureBlissAK commented on GitHub (Apr 18, 2026): <!-- ollama-issue-orchestrator:v1 issue:15485 --> ## 🤖 Automated Triage & Analysis Report **Issue**: #15485 **Analyzed**: 2026-04-18T18:20:49.674298 ### Analysis - **Type**: unknown - **Severity**: medium - **Components**: unknown ### Implementation Plan - **Effort**: medium - **Steps**: *This issue has been triaged and marked for implementation.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#71960