{
  "id": "CVE-2026-27876",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-27876",
  "published_at": "2026-03-27T14:24:36.771Z",
  "title": "RCE on Grafana via sqlExpressions",
  "vendor": "Grafana",
  "product": "Grafana",
  "cvss": {
    "score": 9.1,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-03-30T14:19:58Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 3,
    "repo": "0xBlackash/CVE-2026-27876",
    "source": "github"
  },
  "poc_repo_count": 4,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "A chained attack via SQL Expressions and a Grafana Enterprise plugin can lead to a remote arbitrary code execution impact (RCE). This is enabled by a feature in Grafana (OSS), so all users are always recommended to update to avoid future attack vectors going this path.\n\nOnly instances with the sqlExpressions feature toggle enabled are vulnerable.\n\nOnly instances in the following version ranges are affected:\n\n- 11.6.0 (inclusive) to 11.6.14 (exclusive): 11.6.14 has the fix. 11.5 and below are not affected.\n- 12.0.0 (inclusive) to 12.1.10 (exclusive): 12.1.10 has the fix. 12.0 did not receive an update, as it is end-of-life.\n- 12.2.0 (inclusive) to 12.2.8 (exclusive): 12.2.8 has the fix.\n- 12.3.0 (inclusive) to 12.3.6 (exclusive): 12.3.6 has the fix.\n- 12.4.0 (inclusive) to 12.4.2 (exclusive): 12.4.2 has the fix. 13.0.0 and above also have the fix: no v13 release is affected.",
  "cwe": "CWE-94",
  "cpes": [
    "cpe:2.3:a:grafana:grafana:*:*:*:*:enterprise:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.1
  },
  "repos": [
    {
      "repo": "0xBlackash/CVE-2026-27876",
      "url": "https://github.com/0xBlackash/CVE-2026-27876",
      "created_at": "2026-03-30T14:19:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-02-06T16:11:55Z"
    },
    {
      "repo": "0xredash/CVE-2026-27876",
      "url": "https://github.com/0xredash/CVE-2026-27876",
      "created_at": "2026-03-30T14:19:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-02-06T16:11:55Z"
    },
    {
      "repo": "ashrafzaryouh/CVE-2026-27876",
      "url": "https://github.com/ashrafzaryouh/CVE-2026-27876",
      "created_at": "2026-03-30T14:19:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2026-02-06T16:11:55Z"
    },
    {
      "repo": "atiilla/CVE-2026-27876",
      "url": "https://github.com/atiilla/CVE-2026-27876",
      "created_at": "2026-09-05T23:39:36Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2014-11-28T19:22:00Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Grafana",
        "product": "Grafana",
        "ranges": [
          "\u003e= 11.6.0, \u003c 11.6.14",
          "\u003e= 12.0.0, \u003c 12.1.10",
          "\u003e= 12.2.0, \u003c 12.2.8",
          "\u003e= 12.3.0, \u003c 12.3.6",
          "\u003e= 12.4.0, \u003c 12.4.2"
        ],
        "fixed_in": [
          "11.6.14",
          "12.1.10",
          "12.2.8",
          "12.3.6",
          "12.4.2"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Grafana to 11.6.14 or 12.1.10 or 12.2.8 or 12.3.6 or 12.4.2 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://grafana.com/security/security-advisories/cve-2026-27876"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [
    {
      "method": "GET",
      "path_template": "/api/health",
      "ports": [
        3000,
        3333
      ],
      "protocol": "https",
      "repos": [
        "0xBlackash/CVE-2026-27876",
        "0xredash/CVE-2026-27876",
        "ashrafzaryouh/CVE-2026-27876",
        "atiilla/CVE-2026-27876"
      ],
      "repo_count": 4,
      "confidence": 0.85,
      "evidence": [
        "0xBlackash/CVE-2026-27876/CVE-2026-27876-check.yaml:26",
        "0xredash/CVE-2026-27876/CVE-2026-27876-check.yaml:26",
        "ashrafzaryouh/CVE-2026-27876/CVE-2026-27876-check.yaml:26",
        "atiilla/CVE-2026-27876/poc/exploit.py:251"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/ds/query",
      "headers": [
        {
          "name": "Authorization",
          "value": "Basic {var}"
        }
      ],
      "body_markers": [
        "\"queries\"",
        "\"refId\":\"A\"",
        "\"datasource\"",
        "\"type\":\"__expr__\"",
        "\"uid\":\"__expr__\"",
        "\"type\":\"sql\"",
        "\"expression\"",
        "\"from\":\"now-1h\"",
        "\"to\":\"now\""
      ],
      "content_type": "application/json",
      "ports": [
        3000,
        3333
      ],
      "protocol": "http",
      "repos": [
        "atiilla/CVE-2026-27876"
      ],
      "repo_count": 1,
      "confidence": 0.85,
      "evidence": [
        "atiilla/CVE-2026-27876/analysis.md:124",
        "atiilla/CVE-2026-27876/poc/exploit.py:205",
        "atiilla/CVE-2026-27876/poc/exploit.py:331",
        "atiilla/CVE-2026-27876/poc/exploit.py:419"
      ]
    },
    {
      "method": "GET",
      "path_template": "/api/org",
      "ports": [
        3000,
        3333
      ],
      "protocol": "http",
      "repos": [
        "atiilla/CVE-2026-27876"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "atiilla/CVE-2026-27876/poc/exploit.py:178"
      ]
    },
    {
      "method": "GET",
      "path_template": "/api/user",
      "ports": [
        3000,
        3333
      ],
      "protocol": "http",
      "repos": [
        "atiilla/CVE-2026-27876"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "atiilla/CVE-2026-27876/poc/exploit.py:184"
      ]
    },
    {
      "method": "POST",
      "path_template": "/login",
      "body_markers": [
        "\"user\"",
        "\"password\""
      ],
      "content_type": "application/json",
      "ports": [
        3000,
        3333
      ],
      "protocol": "http",
      "repos": [
        "atiilla/CVE-2026-27876"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "atiilla/CVE-2026-27876/poc/exploit.py:165"
      ]
    }
  ],
  "rules": []
}
