Sceawere
Vulnerability Detail
CVE-2026-17183UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
Grafana OSS Incorrect Authorization Vulnerability
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 7.1
- Creation Date
- 3h ago
- Vendor
- Grafana
- Product
- Grafana OSS
- Attack Type
- CWE-863: INCORRECT AUTHORIZATION
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
- Attack Complexity
- LOW
Narrative and Response
Description
Summary An authenticated organization user who can create or edit alert rules in a folder can query a datasource for which they do not have datasources:query permission. The attacker sets the client-controlled query field queryType to __expr__ while retaining the UID of a real datasource. The alert-rule authorization path treats the query as a server-side expression and skips datasource permission enforcement, while the evaluator subsequently resolves and executes the query against the real datasource identified by datasourceUid. ## Impact This bypass can expose data accessible through Grafana's configured datasource credentials to a low-privileged user who is not authorized to query that datasource directly. Confidentiality impact is High. Integrity impact is Low because some datasource backends and configured credentials may permit state-changing queries. No availability impact has been demonstrated. ## Attack prerequisites - Authenticated, low-privileged user in the same Grafana organization - Permission to create or edit alert rules in an accessible folder - No datasources:query permission for the targeted datasource - Knowledge or discovery of the targeted datasource UID - No user interaction required ## Technical details / root cause 1. The attacker submits an alert-rule query with queryType: "__expr__" and the UID of a real datasource. 2. The datasource authorization helper skips permission enforcement when query.QueryType == "__expr__". 3. queryType is client-controlled and is not validated against the referenced datasource. 4. During evaluation, Grafana selects and loads the actual datasource using DatasourceUID, not the spoofed queryType. 5. The query therefore executes using Grafana's datasource credentials despite the caller lacking datasources:query. The root cause is inconsistent query classification between authorization and execution: authorization trusts queryType, while execution trusts DatasourceUID. ## Affected product / component - Product: Grafana OSS - Component: Unified Alerting / ngalert - Area: Alert-rule datasource authorization and query evaluation - Confirmed version: Grafana OSS 13.0.1 - Affected version range: not yet assessed ## Severity - CVSS 3.1: 7.1 High - Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N - CWE-863: Incorrect Authorization Scope is Unchanged because the vulnerable authorization decision and resulting impact remain within Grafana's security authority. ## Source - Researcher: czarflix - Intigriti report: GRAFANALABS-F996ATD7 - Report URL: https://app.intigriti.com/company/submissions/GRAFANALABS-F996ATD7 ## Related report / duplicate assessment This is a default-Grafana-OSS reproduction of the root cause previously reported in GRAFANALABS-IAQAFIXI. The earlier submission was archived as Not Applicable because its proof of concept depended on Cloud/Enterprise-specific permission mechanisms, and the researcher was invited to demonstrate the issue under default OSS permissions. This report establishes that missing prerequisite and should be treated as the actionable OSS submission, not dismissed as a duplicate. VUL-2026-0095 and VUL-2026-0126 concern Enterprise Recorded Queries and have different components, endpoints, and root causes; they are related authorization issues but not duplicates. ## Recommended remediation - Do not exempt a query from datasource authorization based solely on client-controlled queryType. - Resolve the referenced datasource server-side before authorization and apply datasources:query whenever the resolved UID represents a real datasource. - Require expression queries to reference only the canonical server-side expression datasource and reject mismatches such as queryType: "__expr__" paired with a real datasource UID. - Ensure authorization and evaluation use the same canonical datasource identity and fail closed when fields conflict. - Add regression coverage for an OSS user with folder-level alert-rule edit permission but without datasource query permission, including mismatched queryType and datasourceUid values.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "7.1",
"pubDate": "2026-08-19T18:16:35.940Z",
"pubdate": "2026-08-19T18:16:35.940Z",
"executiveSummary": "An incorrect authorization vulnerability exists in Grafana OSS Unified Alerting ngalert component, tracked via CWE-863, affecting version 13.0.1. The flaw allows an authenticated, low-privileged organization user with folder-level alert rule creation or editing permissions to query restricted datasources without holding the necessary datasources:query permission. The vulnerability arises from an inconsistency between query classification during authorization and query execution. Specifically, when a client submits an alert-rule query with a manipulated queryType of __expr__ combined with the UID of a real datasource, the authorization path treats the payload as a server-side expression and bypasses permission checks. Conversely, the evaluator uses the provided datasourceUid to load and execute the query against the actual datasource using Grafana's stored credentials. The impact carries a CVSS 3.1 score of 7.1 (High), primarily posing severe risks to data confidentiality by exposing sensitive backend data to unauthorized users, alongside low integrity risks if state-changing queries are permitted by the backend. Exploitation requires network access, an authenticated low-privileged account, folder-level alert rule editing permissions, and knowledge or discovery of the targeted datasource UID, with no user interaction required.",
"technicalDetails": "The vulnerability resides in Grafana OSS within the Unified Alerting and ngalert component, specifically concerning alert-rule datasource authorization and query evaluation logic. The root cause is an inconsistent query classification mechanism between the authorization checks and the evaluation stage. During the authorization phase, the security helper inspects the client-controlled queryType field. If queryType is set to __expr__, the authorization path assumes the query is a server-side expression and completely skips datasource permission enforcement. However, the client-controlled queryType is never validated or matched against the referenced datasource. In the subsequent evaluation stage, Grafana ignores the spoofed queryType and instead resolves and loads the actual target datasource using the client-supplied datasourceUid. Consequently, the query is successfully executed against the real datasource utilizing Grafana's elevated backend credentials, bypassing the fact that the caller completely lacks the required datasources:query permission. The step-by-step attack flow involves: first, an authenticated low-privileged attacker crafts an alert-rule query where queryType is set to __expr__ while simultaneously providing the UID of a real, restricted datasource in the datasourceUid field. Second, the attacker submits this payload through the alert rule creation or editing interface within an accessible folder. Third, the authorization logic processes the request, encounters queryType as __expr__, and incorrectly bypasses the datasources:query permission validation. Fourth, during query evaluation, Grafana extracts the datasourceUid, resolves the underlying real datasource, and executes the query using stored server-side credentials. Finally, the unauthorized data is retrieved and exposed to the low-privileged attacker, resulting in a high-severity confidentiality breach. Network exposure is network-based (AV:N), attack complexity is low (AC:L), privileges required are low (PR:L), user interaction is none (UI:N), and scope remains unchanged (S:U)."
}