The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-31107

CVE-2022-31107: Grafana OAuth Authentication Bypass Flaw

CVE-2022-31107 is an authentication bypass vulnerability in Grafana that allows attackers to take over user accounts via OAuth login. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: February 17, 2026

CVE-2022-31107 Overview

CVE-2022-31107 is an authorization bypass vulnerability in Grafana, an open-source platform for monitoring and observability. This vulnerability allows a malicious user who has authorization to log into a Grafana instance via a configured OAuth Identity Provider (IdP) to take over the account of another user in that Grafana instance. The attack exploits a flaw in how external and internal user accounts are linked together during the OAuth login process.

Critical Impact

Successful exploitation allows complete account takeover of any Grafana user, enabling attackers to access sensitive monitoring data, dashboards, and potentially make unauthorized configuration changes to the monitoring infrastructure.

Affected Products

  • Grafana versions 5.3 through 9.0.2
  • Grafana versions 8.5.0 through 8.5.8
  • Grafana versions 8.4.0 through 8.4.9
  • Grafana versions 8.3.0 through 8.3.9
  • NetApp E-Series Performance Analyzer

Discovery Timeline

  • July 15, 2022 - CVE-2022-31107 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2022-31107

Vulnerability Analysis

This vulnerability represents an authorization bypass (CWE-863) in Grafana's OAuth authentication flow. The flaw exists in the account linking mechanism that occurs when users authenticate via external OAuth providers. During the login process, Grafana attempts to associate external OAuth identities with internal user accounts, but this linking process contains a logic flaw that can be exploited under specific conditions.

The vulnerability requires a network-based attack with low privileges (authenticated OAuth access) but high complexity due to the prerequisite conditions. When successfully exploited, it results in complete compromise of the target user's account with full access to their data and permissions within the Grafana instance.

Root Cause

The root cause lies in Grafana's user account linking logic during OAuth authentication. When a user authenticates via OAuth, Grafana performs a lookup to associate the external identity with an existing internal account. The vulnerability occurs because the linking mechanism improperly handles cases where:

  1. The attacker's external user ID is not already associated with a Grafana account
  2. The attacker's email address is not already associated with a Grafana account
  3. The attacker sets their OAuth provider username to match an existing Grafana username

Under these conditions, Grafana incorrectly links the attacker's OAuth session to the victim's internal account based on username matching rather than proper identity verification.

Attack Vector

The attack requires network access and follows this exploitation path:

  1. The attacker must have legitimate authorization to log into the target Grafana instance via a configured OAuth provider
  2. The attacker identifies the Grafana username of the target user they wish to impersonate
  3. The attacker modifies their username in the OAuth provider to match the target user's Grafana username
  4. The attacker initiates the OAuth login flow to the Grafana instance
  5. Due to the flawed linking logic, Grafana associates the attacker's OAuth session with the victim's account
  6. The attacker gains full access to the victim's Grafana account

The attack exploits the trust relationship between Grafana and the OAuth provider, leveraging the username as an insecure identifier for account linking. Organizations with multiple users authorized via OAuth are particularly at risk, as any authorized OAuth user could potentially target other users within the same instance.

Detection Methods for CVE-2022-31107

Indicators of Compromise

  • Multiple OAuth login attempts from different external user IDs linking to the same internal Grafana account
  • Sudden changes in OAuth provider usernames that match existing Grafana user accounts
  • Unexpected account activity or dashboard access from unfamiliar OAuth sessions
  • Authentication logs showing OAuth logins from users who already have linked accounts via different methods

Detection Strategies

  • Monitor Grafana audit logs for OAuth authentication events, particularly account linking activities
  • Implement alerting for scenarios where an OAuth session links to an account that was previously accessed by a different authentication method
  • Review OAuth provider logs for username changes preceding Grafana authentication attempts
  • Cross-reference Grafana access logs with expected user behavior patterns to identify anomalous activity

Monitoring Recommendations

  • Enable detailed authentication logging in Grafana configuration
  • Implement centralized log collection for both Grafana and OAuth provider authentication events
  • Configure SIEM rules to detect account linking anomalies and multiple identity associations
  • Establish baseline user behavior profiles to identify suspicious account access patterns

How to Mitigate CVE-2022-31107

Immediate Actions Required

  • Upgrade Grafana to patched versions: 9.0.3, 8.5.9, 8.4.10, or 8.3.10
  • Audit all user accounts for unexpected OAuth associations or recent linking activity
  • Review authentication logs for any signs of exploitation prior to patching
  • Consider temporarily disabling OAuth authentication until patches are applied if immediate upgrade is not possible

Patch Information

Grafana has released security patches addressing this vulnerability in the following versions:

  • Grafana 9.0.3 - Grafana Release Notes 9.0.3
  • Grafana 8.5.9 - Grafana Release Notes 8.5.9
  • Grafana 8.4.10 - Grafana Release Notes 8.4.10
  • Grafana 8.3.10

For additional technical details, refer to the GitHub Security Advisory GHSA-mx47-6497-3fv2. NetApp customers should also review the NetApp Security Advisory NTAP-20220901-0010.

Workarounds

  • Disable OAuth login entirely to the Grafana instance if patching is not immediately feasible
  • Ensure all users authorized to log in via OAuth have a corresponding pre-existing user account in Grafana linked to their email address before OAuth authentication occurs
  • Implement strict access controls on OAuth provider user profile modifications, particularly username changes
  • Use email-based account linking exclusively rather than username-based association where possible
bash
# Configuration example - Disable OAuth in grafana.ini
[auth.generic_oauth]
enabled = false

[auth.github]
enabled = false

[auth.google]
enabled = false

[auth.azuread]
enabled = false

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGrafana

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.51%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-863
  • Technical References
  • GitHub Security Advisory

  • NetApp Security Advisory NTAP-20220901-0010
  • Vendor Resources
  • Grafana Release Notes 8.4.10

  • Grafana Release Notes 8.5.9

  • Grafana Release Notes 9.0.3
  • Related CVEs
  • CVE-2026-21724: Grafana OSS Auth Bypass Vulnerability

  • CVE-2021-39226: Grafana Auth Bypass Vulnerability

  • CVE-2025-3260: Grafana Dashboard Auth Bypass Vulnerability

  • CVE-2025-3454: Grafana Auth Bypass Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English