RHEL 9 : grafana (RHSA-2022:8057)

high Nessus Plugin ID 167570

Synopsis

The remote Red Hat host is missing one or more security updates.

Description

The remote Redhat Enterprise Linux 9 host has a package installed that is affected by multiple vulnerabilities as referenced in the RHSA-2022:8057 advisory.

- sanitize-url: XSS due to improper sanitization in sanitizeUrl function (CVE-2021-23648)

- Acceptance of some invalid Transfer-Encoding headers in the HTTP/1 client in net/http before Go 1.17.12 and Go 1.18.4 allows HTTP request smuggling if combined with an intermediate server that also improperly fails to reject the header as invalid. (CVE-2022-1705)

- Uncontrolled recursion in the Parse functions in go/parser before Go 1.17.12 and Go 1.18.4 allow an attacker to cause a panic due to stack exhaustion via deeply nested types or declarations. (CVE-2022-1962)

- grafana: Forward OAuth Identity Token can allow users to access some data sources (CVE-2022-21673)

- client_golang is the instrumentation library for Go applications in Prometheus, and the promhttp package in client_golang provides tooling around HTTP servers and clients. In client_golang prior to version 1.11.1, HTTP server is susceptible to a Denial of Service through unbounded cardinality, and potential memory exhaustion, when handling requests with non-standard HTTP methods. In order to be affected, an instrumented software must use any of `promhttp.InstrumentHandler*` middleware except `RequestsInFlight`;
not filter any specific methods (e.g GET) before middleware; pass metric with `method` label name to our middleware; and not have any firewall/LB/proxy that filters away requests with unknown `method`.
client_golang version 1.11.1 contains a patch for this issue. Several workarounds are available, including removing the `method` label name from counter/gauge used in the InstrumentHandler; turning off affected promhttp handlers; adding custom middleware before promhttp handler that will sanitize the request method given by Go http.Request; and using a reverse proxy or web application firewall, configured to only allow a limited set of methods. (CVE-2022-21698)

- grafana: XSS vulnerability in data source handling (CVE-2022-21702)

- grafana: CSRF vulnerability can lead to privilege escalation (CVE-2022-21703)

- grafana: IDOR vulnerability can lead to information disclosure (CVE-2022-21713)

- Uncontrolled recursion in Decoder.Skip in encoding/xml before Go 1.17.12 and Go 1.18.4 allows an attacker to cause a panic due to stack exhaustion via a deeply nested XML document. (CVE-2022-28131)

- Uncontrolled recursion in Glob in io/fs before Go 1.17.12 and Go 1.18.4 allows an attacker to cause a panic due to stack exhaustion via a path which contains a large number of path separators.
(CVE-2022-30630)

- Uncontrolled recursion in Reader.Read in compress/gzip before Go 1.17.12 and Go 1.18.4 allows an attacker to cause a panic due to stack exhaustion via an archive containing a large number of concatenated 0-length compressed files. (CVE-2022-30631)

- Uncontrolled recursion in Glob in path/filepath before Go 1.17.12 and Go 1.18.4 allows an attacker to cause a panic due to stack exhaustion via a path containing a large number of path separators.
(CVE-2022-30632)

- Uncontrolled recursion in Unmarshal in encoding/xml before Go 1.17.12 and Go 1.18.4 allows an attacker to cause a panic due to stack exhaustion via unmarshalling an XML document into a Go struct which has a nested field that uses the 'any' field tag. (CVE-2022-30633)

- Uncontrolled recursion in Decoder.Decode in encoding/gob before Go 1.17.12 and Go 1.18.4 allows an attacker to cause a panic due to stack exhaustion via a message which contains deeply nested structures.
(CVE-2022-30635)

- Improper exposure of client IP addresses in net/http before Go 1.17.12 and Go 1.18.4 can be triggered by calling httputil.ReverseProxy.ServeHTTP with a Request.Header map containing a nil value for the X-Forwarded-For header, which causes ReverseProxy to set the client IP as the value of the X-Forwarded-For header. (CVE-2022-32148)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Update the affected grafana package.

See Also

https://access.redhat.com/security/cve/CVE-2021-23648

https://access.redhat.com/security/cve/CVE-2022-1705

https://access.redhat.com/security/cve/CVE-2022-1962

https://access.redhat.com/security/cve/CVE-2022-21673

https://access.redhat.com/security/cve/CVE-2022-21698

https://access.redhat.com/security/cve/CVE-2022-21702

https://access.redhat.com/security/cve/CVE-2022-21703

https://access.redhat.com/security/cve/CVE-2022-21713

https://access.redhat.com/security/cve/CVE-2022-28131

https://access.redhat.com/security/cve/CVE-2022-30630

https://access.redhat.com/security/cve/CVE-2022-30631

https://access.redhat.com/security/cve/CVE-2022-30632

https://access.redhat.com/security/cve/CVE-2022-30633

https://access.redhat.com/security/cve/CVE-2022-30635

https://access.redhat.com/security/cve/CVE-2022-32148

https://access.redhat.com/errata/RHSA-2022:8057

https://bugzilla.redhat.com/2044628

https://bugzilla.redhat.com/2050648

https://bugzilla.redhat.com/2050742

https://bugzilla.redhat.com/2050743

https://bugzilla.redhat.com/2065290

Plugin Details

Severity: High

ID: 167570

File Name: redhat-RHSA-2022-8057.nasl

Version: 1.5

Type: local

Agent: unix

Published: 11/15/2022

Updated: 10/3/2023

Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Azure, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.9

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.3

Vector: CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2022-21703

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.9

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: cpe:/o:redhat:enterprise_linux:9, cpe:/o:redhat:rhel_aus:9.2, cpe:/o:redhat:rhel_e4s:9.2, cpe:/o:redhat:rhel_eus:9.2, p-cpe:/a:redhat:enterprise_linux:grafana

Required KB Items: Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list, Host/cpu

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 11/15/2022

Vulnerability Publication Date: 1/18/2022

Reference Information

CVE: CVE-2021-23648, CVE-2022-1705, CVE-2022-1962, CVE-2022-21673, CVE-2022-21698, CVE-2022-21702, CVE-2022-21703, CVE-2022-21713, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631, CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, CVE-2022-32148

CWE: 1325, 200, 201, 352, 425, 444, 772, 79, 863

RHSA: 2022:8057