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.
High severity with no evidence of exploitation so far.
What to do
- Check which version of grafana you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Grafana | grafana | >= 7.4.0-beta1, < 7.5.16; >= 8.0.0, < 8.5.3 | Not 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 system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 6.6 | Medium | CNA (github.com) |
| CVSS 3.1 | 8.5 | High | NVD |
| CVSS 2.0 | 4.9 | Medium | NVD |
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
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/grafana/grafana/security/advisories/GHSA-9rrr-6fq2-4f99Third Party Advisory
Patches and release notes
- github.com/grafana/grafana/pull/49240Issue Tracking, Third Party Advisory
- github.com/grafana/grafana/releases/tag/v7.5.16Release Notes, Third Party Advisory
- github.com/grafana/grafana/releases/tag/v8.5.3Release Notes, Third Party Advisory
Third-party and government advisories
- security.netapp.com/advisory/ntap-20220707-0005/Third Party Advisory
Other vulnerabilities in grafana
- 8.1 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 8.1 High severity
- 7.1 High severity
Recent URL Redirection to Untrusted Site vulnerabilities
- 8.1 High severity
- 6.1 Medium severity
- 4.7 Medium severity
Oracle Fusion Middleware Unspecified Exploited
Spotted an error? Tell us.