Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

We cannot remember your choice unless you click the consent notice at the bottom.

Grafana 7.5.15 and 8.3.5 released with moderate severity security fixes

Grafana 7.5.15 and 8.3.5 released with moderate severity security fixes

2022-02-08 7 min

Today we are releasing Grafana 8.3.5 and 7.5.15. This patch release includes MEDIUM severity security fixes for vulnerabilities that affect Grafana.

Release v8.3.5, only containing a security fix:

Release v7.5.15, only containing a security fix:

Appropriate patches have been applied to Grafana 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.

Summary of vulnerabilities

  • XSS vulnerability in Grafana (CVE-2022-21702) - CVSSv3.1 6.8 (MEDIUM)
  • CSRF vulnerability in Grafana (CVE-2022-21703) - CVSSv3.1 6.8 (MEDIUM)
  • IDOR vulnerability in Grafana (CVE-2022-21713) - CVSSv3.1 4.3 (MEDIUM)

Acknowledgements

We would like to thank Jasu Vindig, @jub0bs, @abrahack, and Kürşad ALSAN for responsibly disclosing these vulnerabilities.

If you believe you have found a security vulnerability yourself, please see Reporting security issues below.

XSS (CVE-2022-21702)

Summary

On Jan. 16, an external security researcher, Jasu Viding contacted Grafana to disclose an XSS vulnerability in the way that Grafana handles data sources. Should an existing data source connected to Grafana be compromised, it could be used to inappropriately gain access to other data sources connected to the same Grafana org. We believe that this vulnerability is rated at CVSS 6.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N).

Affected versions with MEDIUM severity

To be impacted, all of the following must be applicable for each scenario:

For data source proxy

  • A Grafana instance running version v2.0.0-beta1 up to v8.3.4.

  • A Grafana HTTP-based datasource configured with Server as Access Mode and a URL set.

  • Attacker to be in control of the HTTP server serving the URL of above datasource.
  • A specially crafted link pointing at http://host/api/datasources/proxy/“data source id” and somehow trick a user of the above Grafana instance to click/visit the link.
  • A user that’s already authenticated to above Grafana instance to click on/visit the specially crafted link sent/provided by the attacker.


For plugin proxy

  • A Grafana instance running version v2.0.0-beta1 up to v8.3.4.
  • A Grafana HTTP-based app plugin configured and enabled with a URL set.
  • Attacker to be in control of the HTTP server serving the URL of above app.
  • A specially crafted link pointing at http://host/api/plugin-proxy/“plugin id” and somehow trick a user of the above Grafana instance to click/visit the link.
  • A user that’s already authenticated to above Grafana instance to click on/visit the specially crafted link sent/provided by the attacker.

For backend plugin resource

  • A Grafana instance running version v7.0.0-beta1 up to v8.3.4.
  • Attacker potentially needs to craft a custom plugin to be able to pull this off, but if an attacker can compromise/control the backend service that a backend plugin connects to, it might be possible to serve HTML content via the /api/plugins/“plugin id”/resources* or /api/datasources/“id”/resources* routes.
  • A specially crafted link pointing at /api/plugins/“plugin id”/resources* or /api/datasources/“id”/resources* and somehow trick a user of the above Grafana instance to click/visit the link.
  • A user that’s already authenticated to above Grafana instance to clicks on/visits the specially crafted link sent/provided by the attacker.

Solutions and mitigations

All installations between v2.0.0-beta1 up to v8.3.4 should be upgraded as soon as possible.

Timeline and postmortem

Here is a detailed timeline starting from when we originally learned of the issue. All times in UTC.

  • 2022-01-16 16:19 Issue submitted by Jasu Viding
  • 2022-01-17 14:40 CVSS score confirmed 6.8 at maximum and MEDIUM impact
  • 2022-01-17 15:15 Vulnerability confirmed reproducible
  • 2022-01-17 16:01 Begin mitigation for Grafana Cloud
  • 2022-01-18 15:12 Similar report received
  • 2022-01-19 09:57 CVE requested
  • 2022-01-19 13:21 PR with fix opened
  • 2022-01-19 19:53 GitHub issues CVE-2022-21702
  • 2022-01-20 12:43 Second similar report received
  • 2022-01-21 14:30 Private release planned for 2022-01-25, and public release planned for 2022-02-01
  • 2022-01-25 12:00 Private release with patches
  • 2022-02-01 12:00 During the public release process, we realized that private 7.x release was incomplete. Abort public release, and send second private release to customers using 7.x
  • 2022-02-08 13:00 Public release

CSRF (CVE-2022-21703)

Summary

On Jan. 18, security researchers @jub0bs and @abrahack contacted Grafana to disclose a CSRF vulnerability which allows anonymous attackers to elevate their privileges by mounting cross-origin attacks against authenticated high-privilege Grafana users (for example, Editors or Admins). An attacker can exploit this vulnerability for privilege escalation by tricking an authenticated user into inviting the attacker as a new user with high privileges. We believe that this vulnerability is rated at CVSS 6.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N).

Affected versions with MEDIUM severity

All Grafana >=3.0-beta1 versions are affected by this vulnerability.

Solutions and mitigations

All installations after Grafana v3.0-beta1 should be upgraded as soon as possible. Note that if you are running Grafana behind any reverse proxy, you need to make sure that you are passing the original Host and Origin headers from the client request to Grafana.

In the case of Apache Server, you need to add ProxyPreserveHost on in your proxy configuration. In case of NGINX, you can need to add proxy_set_header Host $http_host; in your configuration.

Timeline and postmortem

Here is a detailed timeline starting from when we originally learned of the issue. All times in UTC.

  • 2022-01-18 03:00 Issue submitted by external researchers
  • 2022-01-18 17:25 Vulnerability confirmed reproducible
  • 2022-01-19 07:40 CVSS score confirmed 6.8 at maximum and MEDIUM impact
  • 2022-01-19 07:40 Begin mitigation for Grafana Cloud
  • 2022-01-19 17:00 CVE requested
  • 2022-01-19 19:50 GitHub issues CVE-2022-21703
  • 2022-01-21 10:50 PR with fix opened
  • 2022-01-21 14:13 Private release planned for 2022-01-25, and public release planned for 2022-02-01.
  • 2022-01-25 12:00 Private release
  • 2022-02-01 12:00 During the public release process, we realized that private 7.x release was incomplete. Abort public release, and send second private release to customers using 7.x
  • 2022-02-08 13:00 Public release

Teams API IDOR (CVE-2022-21713)

Summary

On Jan. 18, an external security researcher, Kürşad ALSAN from NSPECT.IO (@nspectio on Twitter), contacted Grafana to disclose an IDOR (Insecure Direct Object Reference) vulnerability on Grafana Teams APIs. This vulnerability only impacts the following API endpoints:

  • /teams/:teamId - an authenticated attacker can view unintended data by querying for the specific team ID.
  • /teams/:search - an authenticated attacker can search for teams and see the total number of available teams, including for those teams that the user does not have access to.
  • /teams/:teamId/members - when editors_can_admin flag is enabled, an authenticated attacker can see unintended data by querying for the specific team ID.

We believe that this vulnerability is rated at CVSS 4.3 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Affected versions

All Grafana >= 5.0.0-beta1 versions are affected by this vulnerability.

Solutions and mitigations

All installations after Grafana v5.0.0-beta1 should be upgraded as soon as possible.

Timeline and postmortem

Here is a detailed timeline starting from when we originally learned of the issue. All times in UTC.

  • 2022-01-18 05:00 Issue submitted by external researcher
  • 2022-01-21 17:45 Issue escalated and the vulnerability confirmed reproducible
  • 2022-01-24 13:37 CVE requested
  • 2022-01-24 14:40 Private release planned for 2022-01-25, and public release planned for 2022-02-01.
  • 2022-01-24 17:00 PR with fix opened
  • 2022-01-24 19:00 GitHub has issued CVE-2022-21713
  • 2022-01-25 12:00 Private release
  • 2022-02-01 12:00 During the public release process, we realized that private 7.x release was incomplete. Abort public release, and send second private release to customers using 7.x
  • 2022-02-08 13:00 Public release

Reporting security issues

If 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

F988 7BEA 027A 049F AE8E 5CAA D125 8932 BE24 C5CA

The key is available from keyserver.ubuntu.com.

Security announcements

We maintain a security category on our blog, where we will always post a summary, remediation, and mitigation details for any patch containing security fixes.

You can also subscribe to our RSS feed.