Grafana- bug- User sync failed - User already exists

Grafana security release: New versions of Grafana with a critical security fix for CVE-2023-3128

Vardan Torosyan

• 22 Jun, 2023 • 4 min


Today we are releasing Grafana 10.0.1, 9.5.5, 9.4.13, 9.3.16, 9.2.20, and 8.5.27. Alongside other bug fixes, these patch releases include critical severity security fix for CVE-2023-3128.

Release 10.0.1, latest patch, also containing security fix:

Release 9.5.5, also containing security fix:

Release 9.4.13, also containing security fix:

Release 9.3.16, also containing security fix:

Release 9.2.20, also containing security fix:

Release 8.5.27, also containing security fix:

Appropriate patches have been applied to Grafana Cloud and as always, we closely coordinated with all cloud providers licensed to offer Grafana Cloud 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 and Azure Managed Grafana.

Account takeover / authentication bypass (CVE-2023-3128)

Summary

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.

The CVSS score for this vulnerability is 9.4 Critical.

Impact

If exploited, the attacker can gain complete control of a user's account, including access to private customer data and sensitive information. All users in Grafana deployments with Azure AD OAuth configured with a multi-tenant Azure app and that do not have allowed_groups configured are affected and can be compromised.

Impacted versions

All installations for Grafana versions >= 6.7.0.

Solutions and mitigations

To fully address CVE-2023-3128, please upgrade your Grafana instances. Appropriate patches have been applied to Grafana Cloud.

As an alternative mitigation solution, you can apply one of the following:

  • 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.

Potentially breaking changes and resolution explanation

Our patch removes unsafe email lookups from every auth provider and relies solely on the user's unique ID provided by the identity provider.

Looking up users by email can be safe for some identity providers (for example, when they are single tenants and unique non-editable, validated emails are provided), as well as in some infrastructures.

The resolution might potentially break your user authentication workflows in these scenarios:

  • When Grafana is configured to use multiple identity providers (including a combination of standard Grafana login/password authentication with additional SSO), and you have users with the same email address in multiple identity providers.
  • When Grafana is configured to use generic OAuth with an identity provider that does not support the unique ID field.

If your Grafana instance was relying on this functionality, you might see one of the following messages when signing in:

复制代码
Login Failed - User sync failed 
Login Failed - User already exists 

In order to work around the errors, we have left an escape hatch that you can use to enable email lookup. You can use the following configuration in your Grafana instance to bring the previous behavior back.

复制代码
[auth]
oauth_allow_insecure_email_lookup = true

*Note: We highly recommend against utilizing the above option and instead encourage ensuring user uniqueness across multiple identity providers, while also opting for an identity provider that supports a unique ID field.

Reporting security issues

If you think you have found a vulnerability, please go to our security issue page to learn how to send in a report. You can also read our recent blog post on the Bug Bounty Program to find out more details.

Grafana Labs will send you a response indicating the next steps in handling your report. After the initial reply, the security team will keep you informed of the progress towards a fix and full announcement, and we may ask for additional information or guidance.

Important: We ask you to not disclose the vulnerability before it has been fixed and announced, unless you received a response from the Grafana Labs security team that you can do so.

Security announcements

We will post a summary, remediation, and mitigation details for any patch containing security fixes on the Grafana Labs blog. You can also track security announcements via the RSS feed.

Tags

Security

相关推荐
Insist75321 小时前
prometheus安装部署与alertmanager邮箱告警
linux·运维·grafana·prometheus
爱敲代码的TOM1 天前
Grafana+Loki+Alloy构建企业级日志平台
grafana
linux修理工2 天前
n1 ARMbian部署Grafana
arm开发·架构·grafana
_何同学5 天前
Spring Boot 监控实战:集成 Prometheus 与 Grafana,打造全方位监控体系
spring boot·grafana·prometheus
苦逼IT运维8 天前
Jenkins 监控方案:Prometheus + Grafana 实践
jenkins·grafana·prometheus
川石课堂软件测试10 天前
Oracle 数据库:视图与索引
数据库·网络协议·nginx·http·oracle·grafana·prometheus
川石课堂软件测试11 天前
Oracle 数据库如何查询列
linux·数据库·sql·功能测试·oracle·grafana·prometheus
MasterNeverDown14 天前
.NET 微服务日志系统:Serilog + Loki + Grafana 实践指南
微服务·.net·grafana
❀͜͡傀儡师15 天前
docker安装Prometheus和Grafana 监控界面
docker·grafana·prometheus
好运连连99915 天前
ubuntu promethus+grafana监控多台服务器
linux·ubuntu·grafana