{"answers":{"affected":"10 open source packages ship an affected version, including github.com/grafana/grafana and grafana. It affects 2 products.","exploited":"There is no known exploitation of CVE-2022-31107 in the wild and no public exploit code.","fix":"Upgrade github.com/grafana/grafana to a fixed version for your release line: 8.3.10, 8.4.10, 8.5.9 or 9.0.3.","what":"CVE-2022-31107 is a high-severity authentication bypass vulnerability in Grafana Grafana, published on 15 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31107 and fix it if it is affected.\n\nWhat it is: CVE-2022-31107 is a high-severity authentication bypass vulnerability in Grafana Grafana, published on 15 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31107 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/grafana/grafana (Go): affected all versions; no fix listed\n- github.com/grafana/grafana (Go): affected from 5.3.0-beta1; fixed in 8.3.10\n- github.com/grafana/grafana (Go): affected from 5.3.0-beta1; fixed in 8.3.10\n- github.com/grafana/grafana (Go): affected from 8.4.0; fixed in 8.4.10\n- github.com/grafana/grafana (Go): affected from 8.4.0; fixed in 8.4.10\n- github.com/grafana/grafana (Go): affected from 8.5.0; fixed in 8.5.9\n- github.com/grafana/grafana (Go): affected from 8.5.0; fixed in 8.5.9\n- github.com/grafana/grafana (Go): affected from 9.0.0; fixed in 9.0.3\n- github.com/grafana/grafana (Go): affected from 9.0.0; fixed in 9.0.3\n- grafana (Bitnami): affected from 5.3.0; fixed in 8.3.10, 8.4.10, 8.5.9, 9.0.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31107/ (Markdown: https://insights.sbomify.com/CVE-2022-31107/index.md)","id":"CVE-2022-31107","markdown":"https://insights.sbomify.com/CVE-2022-31107/index.md","name":"CVE-2022-31107","record":{"aliases":["ALSA-2022:5716","ALSA-2022:5717","BIT-grafana-2022-31107","GHSA-mx47-6497-3fv2","GO-2024-2852","MINI-3hm7-3m35-8856","MINI-47g7-hj9x-v656","MINI-4q9c-p752-8qj4","MINI-5hm2-79xj-x3jq","MINI-78m2-44r6-g54c","MINI-7j3h-j3jc-4qgp","MINI-7q9j-mprp-x6xr","MINI-85hc-xc2m-v9fm","MINI-8rwq-cxmm-37q4","MINI-9rfv-7fwv-qjgw","MINI-grrf-8pp3-242q","MINI-h68h-5p85-qrv5","MINI-h8qw-xgjh-hg6f","MINI-hj3r-r78g-mmqm","MINI-rvrw-hp6m-rc4w","MINI-x8pq-qqj7-vh25","MINI-xhw5-fq66-p5qf","OESA-2022-1870","RHSA-2022:5716","RHSA-2022:5717","RHSA-2022:5718","RHSA-2022:5719","RHSA-2022:5720","RLSA-2022:5716","RLSA-2022:5717","UBUNTU-CVE-2022-31107"],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["account_takeover"],"network_reachable":"yes","non_default_config":true,"product_category":"Grafana monitoring platform","requires_auth":"low_privilege","summary":"Attackers can take over other users' accounts by manipulating OAuth login names if specific account linking conditions are met.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"grafana","vendor":"grafana"},{"product":"e-series_performance_analyzer","vendor":"netapp"}],"cvss":{"score":7.1,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"description":"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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Bitnami","Go","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:9::appstream","Red Hat:rhel_e4s:8.1::appstream","Red Hat:rhel_eus:8.2::appstream","Red Hat:rhel_eus:8.4::appstream","Rocky Linux:8","Rocky Linux:9"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Grafana account takeover via OAuth vulnerability","id":"CVE-2022-31107","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"grafana:grafana","products":["grafana:grafana","netapp:e-series_performance_analyzer"],"type":"auth_bypass","year":"2022"},"n_packages":48,"n_references":5,"next":{"headline":"Arbitrary `CSS` injection into the generated graph affecting the container HTML in mermaid.js","id":"CVE-2022-31108"},"packages":[{"ecosystem":"Bitnami","fixed":["8.3.10","8.4.10","8.5.9","9.0.3"],"introduced":["5.3.0","8.4.0","8.5.0","9.0.0"],"last_affected":[],"package":"grafana","purl":"pkg:bitnami/grafana","source":"BIT-grafana-2022-31107"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GO-2024-2852"},{"ecosystem":"Go","fixed":["8.3.10"],"introduced":["5.3.0-beta1"],"last_affected":[],"package":"github.com/grafana/grafana","purl":null,"source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"Go","fixed":["8.3.10"],"introduced":["5.3.0-beta1"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"Go","fixed":["8.4.10"],"introduced":["8.4.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":null,"source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"Go","fixed":["8.4.10"],"introduced":["8.4.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"Go","fixed":["8.5.9"],"introduced":["8.5.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":null,"source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"Go","fixed":["8.5.9"],"introduced":["8.5.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"Go","fixed":["9.0.3"],"introduced":["9.0.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":null,"source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"Go","fixed":["9.0.3"],"introduced":["9.0.0"],"last_affected":[],"package":"github.com/grafana/grafana","purl":"pkg:golang/github.com/grafana/grafana","source":"GHSA-mx47-6497-3fv2"},{"ecosystem":"AlmaLinux:8","fixed":["7.5.11-3.el8_6"],"introduced":["0"],"last_affected":[],"package":"grafana","purl":"pkg:rpm/almalinux/grafana","source":"ALSA-2022:5717"},{"ecosystem":"AlmaLinux:9","fixed":["7.5.11-5.el9_0"],"introduced":["0"],"last_affected":[],"package":"grafana","purl":"pkg:rpm/almalinux/grafana","source":"ALSA-2022:5716"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:7.5.11-3.el8_6"],"introduced":["0"],"last_affected":[],"package":"grafana","purl":"pkg:rpm/redhat/grafana","source":"RHSA-2022:5717"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:7.5.11-3.el8_6"],"introduced":["0"],"last_affected":[],"package":"grafana-debuginfo","purl":"pkg:rpm/redhat/grafana-debuginfo","source":"RHSA-2022:5717"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:7.5.11-5.el9_0"],"introduced":["0"],"last_affected":[],"package":"grafana","purl":"pkg:rpm/redhat/grafana","source":"RHSA-2022:5716"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:7.5.11-5.el9_0"],"introduced":["0"],"last_affected":[],"package":"grafana-debuginfo","purl":"pkg:rpm/redhat/grafana-debuginfo","source":"RHSA-2022:5716"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana","purl":"pkg:rpm/redhat/grafana","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-azure-monitor","purl":"pkg:rpm/redhat/grafana-azure-monitor","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-cloudwatch","purl":"pkg:rpm/redhat/grafana-cloudwatch","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-debuginfo","purl":"pkg:rpm/redhat/grafana-debuginfo","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-elasticsearch","purl":"pkg:rpm/redhat/grafana-elasticsearch","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-graphite","purl":"pkg:rpm/redhat/grafana-graphite","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-influxdb","purl":"pkg:rpm/redhat/grafana-influxdb","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-loki","purl":"pkg:rpm/redhat/grafana-loki","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-mssql","purl":"pkg:rpm/redhat/grafana-mssql","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-mysql","purl":"pkg:rpm/redhat/grafana-mysql","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-opentsdb","purl":"pkg:rpm/redhat/grafana-opentsdb","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-postgres","purl":"pkg:rpm/redhat/grafana-postgres","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-prometheus","purl":"pkg:rpm/redhat/grafana-prometheus","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_e4s:8.1::appstream","fixed":["0:6.2.2-9.el8_1"],"introduced":["0"],"last_affected":[],"package":"grafana-stackdriver","purl":"pkg:rpm/redhat/grafana-stackdriver","source":"RHSA-2022:5720"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana","purl":"pkg:rpm/redhat/grafana","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-azure-monitor","purl":"pkg:rpm/redhat/grafana-azure-monitor","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-cloudwatch","purl":"pkg:rpm/redhat/grafana-cloudwatch","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-debuginfo","purl":"pkg:rpm/redhat/grafana-debuginfo","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-elasticsearch","purl":"pkg:rpm/redhat/grafana-elasticsearch","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-graphite","purl":"pkg:rpm/redhat/grafana-graphite","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-influxdb","purl":"pkg:rpm/redhat/grafana-influxdb","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-loki","purl":"pkg:rpm/redhat/grafana-loki","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-mssql","purl":"pkg:rpm/redhat/grafana-mssql","source":"RHSA-2022:5719"},{"ecosystem":"Red Hat:rhel_eus:8.2::appstream","fixed":["0:6.3.6-5.el8_2"],"introduced":["0"],"last_affected":[],"package":"grafana-mysql","purl":"pkg:rpm/redhat/grafana-mysql","source":"RHSA-2022:5719"}],"prev":{"headline":"Prototype Pollution in underscore.deep","id":"CVE-2022-31106"},"products":["grafana"],"published":"2022-07-15","related":[{"cvss_score":7.5,"headline":"Grafana Path Traversal","id":"CVE-2021-43798","kev_date_added":"2025-10-09","published":"2021-12-07"},{"cvss_score":10,"headline":"Incorrect privilege assignment","id":"CVE-2025-41115","kev_date_added":null,"published":"2025-11-21"},{"cvss_score":9.8,"headline":"Grafana vulnerable to race condition allowing privilege escalation","id":"CVE-2022-39328","kev_date_added":null,"published":"2022-11-08"},{"cvss_score":9.8,"headline":"Auth bypass in n/a","id":"CVE-2022-28660","kev_date_added":null,"published":"2022-05-20"},{"cvss_score":9.8,"headline":"Information disclosure in n/a","id":"CVE-2022-26148","kev_date_added":null,"published":"2022-03-21"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2018-15727","kev_date_added":null,"published":"2018-08-29"},{"cvss_score":9.4,"headline":"Grafana SQL Expressions allow for remote code execution","id":"CVE-2024-9264","kev_date_added":null,"published":"2024-10-18"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-01-28","vendors":["grafana"]},"summary":"Attackers can take over other users' accounts by manipulating OAuth login names if specific account linking conditions are met.","url":"https://insights.sbomify.com/CVE-2022-31107/"}