Bug 1649697 (CVE-2018-19039)

Summary: CVE-2018-19039 grafana: File exfiltration
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ahardin, alegrand, anpicker, apevec, bleanhar, bmontgom, ccoleman, chrisw, dedgar, eparis, erooth, jburrell, jgoulding, jjoyce, jokerman, jschluet, kakkoyun, kbasil, lcosic, lhh, lpeer, markmc, mburns, mchappel, mloibl, mmagr, nstielau, pkrupa, rbryant, sclewis, sisharma, slinaber, sponnaga, ssaha, surbania, tdecacqu, vbellur
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: grafana 5.3.3, grafana 4.6.5 Doc Type: If docs needed, set a value
Doc Text:
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. However, in order to exploit this issue you would need to be logged in to the system as a legitimate user with Editor or Admin permissions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:42:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1650387, 1650388, 1654560, 1654561, 1654562, 1673093, 1686220    
Bug Blocks: 1649698    

Description Andrej Nemec 2018-11-14 09:26:43 UTC
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

Comment 1 Joshua Padman 2018-11-16 04:29:04 UTC
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’).

Comment 4 Martin Magr 2018-11-27 10:42:58 UTC
Grafana was never in production in OSP.

Comment 9 errata-xmlrpc 2019-04-11 13:32:53 UTC
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

Comment 10 errata-xmlrpc 2019-04-30 15:56:42 UTC
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