CyberSecBulletin
CVE-2022-29170NVD status: Modified

grafana: URL Redirection to Untrusted Site

CVE-2022-29170 is a high-severity URL redirection to untrusted site vulnerability in grafana, with a CVSS 3.1 base score of 8.5 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected grafana versions: >= 7.4.0-beta1, < 7.5.16; >= 8.0.0, < 8.5.3. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.23% chance of exploitation within 30 days, higher than 69% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Check which version of grafana you run against the affected versions below, and install the vendor's latest release.
  2. Read the advisory on github.com for workarounds and exact fixed builds.

Affected products and versions

VendorProductAffected versionsFixed in
Grafanagrafana>= 7.4.0-beta1, < 7.5.16; >= 8.0.0, < 8.5.3Not stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
ChangedThe attack can reach beyond the vulnerable component into other systems.
Confidentiality
HighAll data handled by the component can be read.
Integrity
LowLimited modification of data is possible.
Availability
NoneAvailability is not affected.

Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.16.6MediumCNA (github.com)
CVSS 3.18.5HighNVD
CVSS 2.04.9MediumNVD

Official description

Grafana is an open-source platform for monitoring and observability. In Grafana Enterprise, the Request security feature allows list allows to configure Grafana in a way so that the instance doesn’t call or only calls specific hosts. The vulnerability present starting with version 7.4.0-beta1 and prior to versions 7.5.16 and 8.5.3 allows someone to bypass these security configurations if a malicious datasource (running on an allowed host) returns an HTTP redirect to a forbidden host. The vulnerability only impacts Grafana Enterprise when the Request security allow list is used and there is a possibility to add a custom datasource to Grafana which returns HTTP redirects. In this scenario, Grafana would blindly follow the redirects and potentially give secure information to the clients. Grafana Cloud is not impacted by this vulnerability. Versions 7.5.16 and 8.5.3 contain a patch for this issue. There are currently no known workarounds.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: URL Redirection to Untrusted Site

The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.

How developers prevent this class of flaw

  • Use an intermediate disclaimer page that provides the user with a clear warning that they are leaving the current site. Implement a long timeout before the redirect occurs, or force the user to click on the link. Be careful to avoid XSS problems (CWE-79) when generating the disclaimer page.
  • When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs. For example, ID 1 could map to /login.asp and ID 2 could map to http://www.example.com/. Features such as the ESAPI AccessReferenceMap provide this capability.
  • Ensure that no externally-supplied requests are honored by requiring that all redirect requests include a unique nonce generated by the application. Be sure that the nonce is not predictable (CWE-330).

More URL Redirection to Untrusted Site vulnerabilities (CWE-601)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Patches and release notes

Third-party and government advisories

Other vulnerabilities in grafana

All grafana vulnerabilities

Recent URL Redirection to Untrusted Site vulnerabilities

Spotted an error? Tell us.