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-2026-2020-SSRF-via-URL-Parser-Differential — Demonstrates SSRF exploitation via URL parser differential between urllib.parse and requests, including vulnerable service and PoC exploit script. | Kitploit
Tools/GitHubGitHub/george0papasotiriou/cve-2026-2020-ssrf-via-url-parser-differential
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLearning & Education
GitHubgeorge0papasotiriou/cve-2026-2020-ssrf-via-url-parser-differential

CVE-2026-2020-SSRF-via-URL-Parser-Differential

Demonstrates SSRF exploitation via URL parser differential between urllib.parse and requests, including vulnerable service and PoC exploit script.

View Repository
11 month agoNot yet reviewed

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-2026-2020 – SSRF via URL Parser Differential

Program Code (Python)

root@kitploit:~
# vulnerable_service.py - Validates URL with urllib.parse, fetches with requests
from flask import Flask, request
import requests
import urllib.parse

app = Flask(__name__)

def is_allowed_url(url):
    parsed = urllib.parse.urlparse(url)
    # Only allow http://localhost and http://127.0.0.1
    return parsed.hostname in ('localhost', '127.0.0.1')

@app.route('/fetch')
def fetch():
    url = request.args.get('url')
    if not is_allowed_url(url):
        return "Blocked", 403
    # Fetch with requests (different parser)
    r = requests.get(url, timeout=5)
    return r.text

if __name__ == '__main__':
    app.run(port=5000)

CVE-2026-2020 – SSRF via URL Parser Differential

Severity: High

Overview

A service uses Python’s urllib.parse.urlparse to validate URLs but then fetches them with the requests library. Discrepancies in how the two parsers handle special characters (like @) allow an attacker to bypass the whitelist and access internal resources.

Vulnerability Details

  • Type: Server‑Side Request Forgery (SSRF) – Parser Differential
  • Impact: Access to internal services, cloud metadata exfiltration.
  • Root Cause: urlparse treats [email protected] as having hostname localhost (the part before @ is username), while requests interprets the host as evil.com.

Exploit Demonstration

  1. Start the vulnerable service:
    root@kitploit:~
    pip install flask requests
    python vulnerable_service.py
    
  2. Run the exploit:
    root@kitploit:~
    python exploit_ssrf_parser_diff.py
    
Download Tool