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.
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:
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: