A security issue was found that could allow any users with Editor or Admin permissions in Grafana to read any file that the Grafana process can read from the filesystem. Note, that in order to exploit this you would need to be logged in to the system as a legitimate user with Editor or Admin permissions. External References: https://community.grafana.com/t/grafana-5-3-3-and-4-6-5-security-update/11961
The following is the patch from upstream: diff --git a/pkg/services/rendering/phantomjs.go b/pkg/services/rendering/phantomjs.go index 1bd7489c1..2be351285 100644 --- a/pkg/services/rendering/phantomjs.go +++ b/pkg/services/rendering/phantomjs.go @@ -42,7 +42,8 @@ func (rs *RenderingService) renderViaPhantomJS(ctx context.Context, opts Opts) ( cmdArgs := []string{ "--ignore-ssl-errors=true", - "--web-security=false", + "--web-security=true", + "--local-url-access=false", phantomDebugArg, scriptPath, fmt.Sprintf("url=%v", url), --web-security=[true|false] enables web security and forbids cross-domain XHR (default is true). Also accepted: [yes|no]. --local-url-access allows use of ‘file:///’ URLs (default is ‘true’).
Grafana was never in production in OSP.
This issue has been addressed in the following products: Red Hat Ceph Storage 2.5 for Red Hat Enterprise Linux 7 Via RHSA-2019:0747 https://access.redhat.com/errata/RHSA-2019:0747
This issue has been addressed in the following products: Red Hat Ceph Storage 3.2 Via RHSA-2019:0911 https://access.redhat.com/errata/RHSA-2019:0911