User Impersonation Affecting github.com/grafana/grafana/pkg package, versions >=6.7.0 <8.5.27>=9.0.0 <9.2.20>=9.3.0 <9.3.16>=9.4.0 <9.4.13>=9.5.0 <9.5.5>=10.0.0 <10.0.1


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.25% (66th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMGRAFANAGRAFANAPKG-5735577
  • published23 Jun 2023
  • disclosed23 Jun 2023
  • creditUnknown

Introduced: 23 Jun 2023

CVE-2023-3128  (opens in a new tab)
CWE-290  (opens in a new tab)

How to fix?

Upgrade github.com/grafana/grafana/pkg to version 8.5.27, 9.2.20, 9.3.16, 9.4.13, 9.5.5, 10.0.1 or higher.

Overview

Affected versions of this package are vulnerable to User Impersonation. Grafana validates Azure Active Directory accounts based on the email claim. On Azure AD, the profile email field is not unique across Azure AD tenants. This can enable a Grafana account takeover and authentication bypass when Azure AD OAuth is configured with a multi-tenant Azure AD OAuth application.

Mitigation:

Adding allowed_groups configuration to the Azure AD configuration would ensure that when a user is signing in, they are also a member of a group in Azure AD. This would ensure that an arbitrary email can’t be used by an attacker.

Registering a single tenant application in Azure AD would prevent the attack vector.

CVSS Base Scores

version 3.1