Skip to content

SAML privilege escalation

High
vtorosyan published GHSA-5hcf-rqj9-xh96 Jan 26, 2023

Package

gomod SAML (Go)

Affected versions

6.3.0-beta1 - 9.3.1

Patched versions

9.3.2, 9.2.8, 8.5.16

Description

Summary

Grafana Enterprise is using crewjam/saml library for SAML integration. On Nov 30, 2022 an advisory and relevant fix was published in the upstream library, which described a vulnerability allowing privilege escalation when processing SAML responses containing multiple assertions.

The vulnerability is possible to exploit only when a SAML document is not signed and multiple assertions are being used, where at least one assertion is signed. As a result, an attacker could intercept the SAML response and add any unsigned assertion, which would be parsed as signed by the library.

Steps to reproduce

Log in with SAML with any credentials
Intercept the SAML response which contains one signed assertion
Add any new unsigned identity assertion containing Admin username/email
Forward the request to Grafana

Mitigations

To fully address CVE-2022-41912 please upgrade your Grafana instances. As an alternative, you could ensure to sign the entire SAML document, or stop using SAML temporarily.

Severity

High
8.3
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

CVE ID

CVE-2022-41912

Weaknesses