{"id":"CVE-2022-31107","aliases":["CVE-2022-31107","GHSA-mx47-6497-3fv2","BIT-GRAFANA-2022-31107","GO-2024-2852"],"related":["CGA-3mgc-jrh8-2rmq"],"kind":"vulnerability","state":"published","title":"Grafana account takeover via OAuth vulnerability","summary":"Grafana is an open-source platform for monitoring and observability. In versions 5.3 until 9.0.3, 8.5.9, 8.4.10, and 8.3.10, it is possible for a malicious user who has authorization to log into a Grafana instance via a configured OAuth IdP which provides a login name to take over the account of another user in that Grafana instance. This can occur when the malicious user is authorized to log in to Grafana via OAuth, the malicious user's external user id is not already associated with an account in Grafana, the malicious user's email address is not already associated with an account in Grafana, and the malicious user knows the Grafana username of the target user. If these conditions are met, the malicious user can set their username in the OAuth provider to that of the target user, then go through the OAuth flow to log in to Grafana. Due to the way that external and internal user accounts are linked together during login, if the conditions above are all met then the malicious user will be able to log in to the target user's Grafana account. Versions 9.0.3, 8.5.9, 8.4.10, and 8.3.10 contain a patch for this issue. As a workaround, concerned users can disable OAuth login to their Grafana instance, or ensure that all users authorized to log in via OAuth have a corresponding user account in Grafana linked to their email address.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Grafana is an open-source platform for monitoring and observability. In versions 5.3 until 9.0.3, 8.5.9, 8.4.10, and 8.3.10, it is possible for a malicious user who has authorization to log into a Grafana instance via a configured OAuth IdP which provides a login name to take over the account of another user in that Grafana instance. This can occur when the malicious user is authorized to log in to Grafana via OAuth, the malicious user's external user id is not already associated with an account in Grafana, the malicious user's email address is not already associated with an account in Grafana, and the malicious user knows the Grafana username of the target user. If these conditions are met, the malicious user can set their username in the OAuth provider to that of the target user, then go through the OAuth flow to log in to Grafana. Due to the way that external and internal user accounts are linked together during login, if the conditions above are all met then the malicious user will be able to log in to the target user's Grafana account. Versions 9.0.3, 8.5.9, 8.4.10, and 8.3.10 contain a patch for this issue. As a workaround, concerned users can disable OAuth login to their Grafana instance, or ensure that all users authorized to log in via OAuth have a corresponding user account in Grafana linked to their email address.","source":"cvelist"},{"lang":"en","text":"Today we are releasing Grafana 8.3.10, 8.4.10, 8.5.9 and 9.0.3. This patch release includes a HIGH severity security fix for an Oauth takeover vulnerability in Grafana.\n\nRelease v.9.0.3, containing this security fix and other patches:\n\n- [Download Grafana 9.0.3](https://grafana.com/grafana/download/9.0.3)\n- [Release notes](https://grafana.com/docs/grafana/next/release-notes/release-notes-9-0-3/)\n\nRelease v.8.5.9, containing this security fix and other fixes:\n\n- [Download Grafana 8.5.9](https://grafana.com/grafana/download/8.5.9)\n- [Release notes](https://grafana.com/docs/grafana/next/release-notes/release-notes-8-5-9/)\n\nRelease v.8.4.10, containing this security fix and other fixes:\n\n- [Download Grafana 8.4.10](https://grafana.com/grafana/download/8.4.10)\n- [Release notes](https://grafana.com/docs/grafana/next/release-notes/release-notes-8-4-10/)\n\nRelease v.8.3.10, containing this security fix and other fixes:\n\n- [Download Grafana 8.3.10](https://grafana.com/grafana/download/8.3.10)\n\n## Grafana account takeover via OAuth vulnerability ([CVE-2022-31107](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31107))\n\n### Summary\nOn June 27 the HTTPVoid team contacted Grafana Labs to disclose a Grafana account takeover via an OAuth vulnerability.\n\nWe believe that this vulnerability is rated at CVSS 7.1 (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L). \n\n### Impact\nIt is possible for a malicious user who has authorization to log into a Grafana instance via a configured OAuth IdP to take over an existing Grafana account under some conditions.\n\n### Affected versions with HIGH severity \nAll Grafana >=5.3 versions are affected by this vulnerability.\n\n### Solutions and mitigations\n\nAll installations after Grafana v5.3 should be upgraded as soon as possible.\n\nAs a workaround it is possible to [disable any OAuth login](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/generic-oauth/) or ensure that all users authorized to log in via OAuth have a corresponding user account in Grafana linked to their email address.\n\nAppropriate patches have been applied to [Grafana Cloud](https://grafana.com/cloud) and as always, we closely coordinated with all cloud providers licensed to offer Grafana Pro. They have received early notification under embargo and confirmed that their offerings are secure at the time of this announcement. This is applicable to Amazon Managed Grafana.\n\n### Timeline\n\nHere is a detailed timeline starting from when we originally learned of the issue. All times in UTC.\n\n2022-06-27 19:00 - Research submission of vulnerability report\n2022-06-27 20:53 - Issue triaged, confirmed positive, and internal incident raised\n2022-06-28 08:42 - Fix PR submitted and reviewed\n2022-06-28 20:58 - All Grafana Cloud hosted Grafana instances patched\n2022-07-05 07:14 - Customers informed under embargo\n2022-07-14 02:00 - Public release\n\n### Acknowledgement\n\nWe would like to thank the HTTPVoid team for responsibly disclosing the vulnerability.\n\n### Reporting security issues\n\nIf you think you have found a security vulnerability, please send a report to security@grafana.com. This address can be used for all of Grafana Labs' open source and commercial products (including, but not limited to Grafana, Grafana Cloud, Grafana Enterprise, and grafana.com). We can accept only vulnerability reports at this address. We would prefer that you encrypt your message to us by using our PGP key. The key fingerprint is\n\nF988 7BEA 027A 049F AE8E 5CAA D125 8932 BE24 C5CA\n\nThe key is available from keyserver.ubuntu.com.\n\n### Security announcements\n\nWe maintain a [security category](https://community.grafana.com/c/support/security-announcements) on our blog, where we will always post a summary, remediation, and mitigation details for any patch containing security fixes.\n\nYou can also subscribe to our [RSS feed](https://grafana.com/tags/security/index.xml).","format":"markdown","source":"ghsa"},{"lang":"en","text":"Grafana account takeover via OAuth vulnerability in github.com/grafana/grafana.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: github.com/grafana/grafana from v5.3.0 before v8.3.10, from v8.4.0 before v8.4.10, from v8.5.0 before v8.5.9, from v9.0.0 before v9.0.3.","format":"markdown","source":"go"},{"lang":"es","text":"Grafana es una plataforma de código abierto para la monitorización y la observación. En versiones 5.3 hasta 9.0.3, 8.5.9, 8.4.10 y 8.3.10, es posible que un usuario malicioso que tenga autorización para iniciar sesión en una instancia de Grafana por medio de un IdP de OAuth configurado que proporcione un nombre de inicio de sesión, tome la cuenta de otro usuario en esa instancia de Grafana. Esto puede ocurrir cuando el usuario malicioso está autorizado a iniciar sesión en Grafana por medio de OAuth, el id de usuario externo del usuario malicioso no está ya asociado a una cuenta en Grafana, la dirección de correo electrónico del usuario malicioso no está ya asociada a una cuenta en Grafana, y el usuario malicioso conoce el nombre de usuario de Grafana del usuario objetivo. Si son cumplidas estas condiciones, el usuario malicioso puede establecer su nombre de usuario en el proveedor OAuth al del usuario objetivo, y luego pasar por el flujo OAuth para iniciar sesión en Grafana. Debido a la forma en que las cuentas de usuario externas e internas están vinculadas durante el inicio de sesión, si las condiciones anteriores son cumplidas, el usuario malicioso podrá iniciar sesión en la cuenta de Grafana del usuario objetivo. Las versiones 9.0.3, 8.5.9, 8.4.10 y 8.3.10 contienen un parche para este problema. Como mitigación, los usuarios afectados pueden deshabilitar el inicio de sesión de OAuth en su instancia de Grafana, o asegurarse de que todos los usuarios autorizados a iniciar sesión por medio de OAuth presentan una cuenta de usuario correspondiente en Grafana vinculada a su dirección de correo electrónico","source":"nvd"}],"published":"2022-07-15T12:30:14.000Z","modified":"2026-09-10T03:49:18.739Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":">= 5.3, < 8.3.10","status":"affected"},{"version":">= 8.4.0, < 8.4.10","status":"affected"},{"version":">= 8.5.0, < 8.5.9","status":"affected"},{"version":">= 9.0.0, < 9.0.3","status":"affected"}],"vendor":"grafana","product":"grafana","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"5.3.0-beta1","status":"affected","fixed":"8.3.10"}],"ecosystem":"Go","package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"8.4.0","status":"affected","fixed":"8.4.10"}],"ecosystem":"Go","package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"8.5.0","status":"affected","fixed":"8.5.9"}],"ecosystem":"Go","package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"9.0.0","status":"affected","fixed":"9.0.3"}],"ecosystem":"Go","package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"go"},{"ranges":[{"status":"affected","introduced":"5.3.0","fixed":"8.3.10"},{"status":"affected","introduced":"8.4.0","fixed":"8.4.10"},{"status":"affected","introduced":"8.5.0","fixed":"8.5.9"},{"status":"affected","introduced":"9.0.0","fixed":"9.0.3"}],"vendor":"grafana","product":"grafana","cpe":"cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"e-series_performance_analyzer","cpe":"cpe:2.3:a:netapp:e-series_performance_analyzer:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"5.3.0","status":"affected","fixed":"8.3.10"},{"type":"semver","introduced":"8.4.0","status":"affected","fixed":"8.4.10"},{"type":"semver","introduced":"8.5.0","status":"affected","fixed":"8.5.9"},{"type":"semver","introduced":"9.0.0","status":"affected","fixed":"9.0.3"}],"ecosystem":"Bitnami","package":"grafana","purl":"pkg:bitnami/grafana","source":"bitnami"}],"references":[{"url":"https://grafana.com/docs/grafana/next/release-notes/release-notes-8-4-10/","tags":["advisory","release-notes","vendor-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://github.com/grafana/grafana/security/advisories/GHSA-mx47-6497-3fv2","tags":["advisory","release-notes","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://grafana.com/docs/grafana/next/release-notes/release-notes-8-5-9/","tags":["advisory","release-notes","vendor-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://grafana.com/docs/grafana/next/release-notes/release-notes-9-0-3/","tags":["advisory","release-notes","vendor-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20220901-0010/","tags":["advisory","third-party-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31107","tags":["advisory","web"],"sources":["ghsa","go","bitnami"]},{"url":"https://github.com/grafana/grafana","tags":["package"],"sources":["ghsa"]},{"url":"https://grafana.com/docs/grafana/next/release-notes/release-notes-8-4-10","tags":["web"],"sources":["ghsa","go"]},{"url":"https://grafana.com/docs/grafana/next/release-notes/release-notes-8-5-9","tags":["web"],"sources":["ghsa","go"]},{"url":"https://grafana.com/docs/grafana/next/release-notes/release-notes-9-0-3","tags":["web"],"sources":["ghsa","go"]},{"url":"https://security.netapp.com/advisory/ntap-20220901-0010","tags":["web"],"sources":["ghsa","go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-27T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-31107","url":"https://www.cve.org/CVERecord?id=CVE-2022-31107","licence":"CVE Terms of Use","modified":"2026-01-28T04:55:31.786Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mx47-6497-3fv2","url":"https://github.com/advisories/GHSA-mx47-6497-3fv2","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:18.739Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2852","url":"https://pkg.go.dev/vuln/GO-2024-2852","licence":"CC-BY-4.0","modified":"2026-02-04T02:33:46.857Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-31107","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31107","licence":"Public domain","modified":"2026-06-17T04:44:48.813Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-GRAFANA-2022-31107","url":"https://osv.dev/vulnerability/BIT-GRAFANA-2022-31107","licence":"Apache-2.0","modified":"2026-09-08T08:47:51.284Z"}],"updatedAt":"2026-11-25T22:58:12.965Z","epss":{"score":0.02874,"percentile":0.87196,"date":"2026-12-01T12:00:22.000Z"}}