Skip to content

Native models enable people without SQL permissions to create and edit SQL snippets

Moderate
nemanjaglumac published GHSA-mw6j-f894-4qxv May 18, 2023

Package

No package listed

Affected versions

<x.46.3, <x.45.4, <x.44.7

Patched versions

0.46.3, 1.46.3, 0.45.4, 1.45.4, 0.44.7, 1.44.7

Description

Impact

To edit SQL Snippets, Metabase should have required people to be in at least one group with native query editing permissions to a database–but Metabase didn't enforce that requirement.

This lack of enforcement meant that:

  • Anyone–including people in sandboxed groups–could edit SQL snippets. They could edit snippets via the API or, in the application UI, when editing the metadata for a model based on a SQL question.
  • People in sandboxed groups could edit a SQL snippet used in a query that creates their sandbox. If the snippet contained logic that restricted which data that person could see, they could potentially edit that snippet and change their level of data access.

Patches

The permissions model for SQL snippets has been fixed in Metabase versions 46.3, 45.4, and 44.7.

Workarounds

For the sandboxing issue, workarounds include:

  • Ensuring that SQL queries used to create sandboxes exclude SQL snippets.
  • In Metabase Enterprise Edition, using SQL snippet folders to restrict access to SQL snippets.

Severity

Moderate
5.8
/ 10

CVSS base metrics

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

CVE ID

CVE-2023-32680

Weaknesses

No CWEs