CVE-2026-42129: Github.com/grafana/grafana Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-f74p-cwhp-x2wx
CVSS 7.7
CWE-22
Published
Advisory Summary

CVE-2026-42129 is a HIGH (CVSS 7.7) remote code execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/grafana/grafana libraries in the Go ecosystem. The issue involves grafana loki datasource plugin's callresource handler contains a path traversal vulnerability.. Remediation is available by upgrading affected packages to version 1.9.2-0.20260616075434-82ef13993059.

CVE-2026-42129 at a Glance

CVE Identifier CVE-2026-42129
GHSA Identifier GHSA-f74p-cwhp-x2wx
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Github.com/grafana/grafana
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (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 Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-42129

To remediate this vulnerability, upgrade all affected Github.com/grafana/grafana dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/grafana/grafana fixed: Latest secure release
Upgrade github.com/grafana/grafana to Latest secure release
github.com/grafana/grafana fixed: Latest secure release
Upgrade github.com/grafana/grafana to Latest secure release
github.com/grafana/grafana fixed: Latest secure release
Upgrade github.com/grafana/grafana to Latest secure release
github.com/grafana/grafana fixed: Latest secure release
Upgrade github.com/grafana/grafana to Latest secure release
github.com/grafana/grafana fixed: Latest secure release
Upgrade github.com/grafana/grafana to Latest secure release
github.com/grafana/grafana fixed: 1.9.2-0.20260616075434-82ef13993059
Upgrade github.com/grafana/grafana to 1.9.2-0.20260616075434-82ef13993059
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/grafana/grafana

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42129, inspect your project dependencies for Github.com/grafana/grafana:

inspect dependencies for github.com/grafana/grafana

Analyze the terminal output to locate any version of Github.com/grafana/grafana in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.2-0.20260616075434-82ef13993059), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/grafana/grafana, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The Loki datasource plugin's callResource handler contains a path traversal vulnerability. An authenticated Viewer-role user can escape the plugin's resource sandbox and access administrative Loki endpoints (e.g. /config, /services, /ready) to extract sensitive backend configuration and internal service information.

CVE-2026-42129 Affected Github.com/grafana/grafana Versions

6 component(s)
Fixed Versions:
1.9.2-0.20260616075434-82ef13993059
Product / Package Ecosystem Affected Versions Fixed Version
github.com/grafana/grafana
Go
≥ 2.0.0-beta1
github.com/grafana/grafana
Go
≥ 12.0.0
github.com/grafana/grafana
Go
≥ 12.3.0
github.com/grafana/grafana
Go
≥ 13.0.0
github.com/grafana/grafana
Go
≥ 12.4.0
github.com/grafana/grafana
Go
< 1.9.2-0.20260616075434-82ef13993059
1.9.2-0.20260616075434-82ef13993059

References

NVD — CVE-2026-42129 NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-42129
Security Fix Commit FIX COMMIT
https://github.com/grafana/grafana/commit/3fcdbc5a6e5c955bd42bd3715dd03cbad2b078c1
Security Fix Commit FIX COMMIT
https://github.com/grafana/grafana/commit/42cdc39124912a8506a0c613c319c345aa950b29
Security Fix Commit FIX COMMIT
https://github.com/grafana/grafana/commit/82ef13993059351bf21de35b8488bbd9b42df4f4
Security Fix Commit FIX COMMIT
https://github.com/grafana/grafana/commit/d27d2eba9c509d16f214d290436a6ad0bd9c6c01
Security Fix Commit FIX COMMIT
https://github.com/grafana/grafana/commit/dd5dc51681ff0133ddb2e206c2ea318713aeca16
Security Fix Commit FIX COMMIT
https://github.com/grafana/grafana/commit/eeb08ceb020c4381242d8400e5878044e9877505
Security Fix Commit FIX COMMIT
https://github.com/grafana/grafana/commit/f70d3e480274a5dbd12006338c393f4b05d441ca
Github.com/grafana/grafana Source Repository REPOSITORY
https://github.com/grafana/grafana
Github.com/grafana/grafana Release RELEASE
https://github.com/grafana/grafana/releases/tag/v11.6.15
Github.com/grafana/grafana Release RELEASE
https://github.com/grafana/grafana/releases/tag/v12.2.9
Github.com/grafana/grafana Release RELEASE
https://github.com/grafana/grafana/releases/tag/v12.3.7
Github.com/grafana/grafana Release RELEASE
https://github.com/grafana/grafana/releases/tag/v12.4.4
Github.com/grafana/grafana Release RELEASE
https://github.com/grafana/grafana/releases/tag/v13.0.2
Github.com/grafana/grafana Security Information SECURITY
https://grafana.com/security/security-advisories/cve-2026-42129

Frequently Asked Questions

What is CVE-2026-42129?
CVE-2026-42129 is a security vulnerability in Github.com/grafana/grafana involving Grafana Loki datasource plugin's callResource handler contains a path traversal vulnerability. under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Github.com/grafana/grafana versions are affected?
Affected versions include releases prior to 1.9.2-0.20260616075434-82ef13993059 across affected packages: github.com/grafana/grafana.
What version fixes CVE-2026-42129?
Upgrading to 1.9.2-0.20260616075434-82ef13993059 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/grafana/grafana affected?
Yes, github.com/grafana/grafana is affected in releases prior to Latest secure release, 1.9.2-0.20260616075434-82ef13993059. Upgrade your dependency to Latest secure release, 1.9.2-0.20260616075434-82ef13993059 or later.
What is the CVSS score of CVE-2026-42129?
CVE-2026-42129 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-42129?
CVE-2026-42129 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Go dependencies for CVE-2026-42129?
Run the dependency tree command: 'inspect dependencies for github.com/grafana/grafana'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f74p-cwhp-x2wx",
  "modified" : "2026-09-21T22:54:43Z",
  "published" : "2026-06-22T15:30:43Z",
  "aliases" : [ "CVE-2026-42129" ],
  "summary" : "Grafana Loki datasource plugin's callResource handler contains a path traversal vulnerability.",
  "details" : "The Loki datasource plugin's callResource handler contains a path traversal vulnerability. An authenticated Viewer-role user can escape the plugin's resource sandbox and access administrative Loki endpoints (e.g. /config, /services, /ready) to extract sensitive backend configuration and internal service information.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0-beta1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 11.6.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "12.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 12.2.9"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "12.3.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 12.3.7"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "13.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 13.0.2"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "12.4.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 12.4.4"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.2-0.20260616075434-82ef13993059"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42129"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/3fcdbc5a6e5c955bd42bd3715dd03cbad2b078c1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/42cdc39124912a8506a0c613c319c345aa950b29"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/82ef13993059351bf21de35b8488bbd9b42df4f4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/d27d2eba9c509d16f214d290436a6ad0bd9c6c01"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/dd5dc51681ff0133ddb2e206c2ea318713aeca16"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/eeb08ceb020c4381242d8400e5878044e9877505"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/f70d3e480274a5dbd12006338c393f4b05d441ca"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/grafana/grafana"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/releases/tag/v11.6.15"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/releases/tag/v12.2.9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/releases/tag/v12.3.7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/releases/tag/v12.4.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/releases/tag/v13.0.2"
  }, {
    "type" : "WEB",
    "url" : "https://grafana.com/security/security-advisories/cve-2026-42129"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-21T22:54:43Z",
    "nvd_published_at" : "2026-06-22T14:17:36Z"
  }
}