/

CVE-2026-50148

Severity:

CRITICAL RISK

(10.0)

Path Traversal (CWE-73) enabling RCE in Metabase

CVE-2026-50148

Analyzed

Vulnerability type

Category:

Path Traversal / Arbitrary File Write

CWE:

CWE-73

Impact:

Remote Code Execution via Arbitrary File Write

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Metabase database connection configuration can be abused to achieve remote code execution on the Metabase server when using a vulnerable Snowflake JDBC driver.

A Metabase user who can add or edit a database connection may point Snowflake to an attacker-controlled server, causing arbitrary files to be written on the host and leading to execution of attacker-controlled code within the Metabase process.

Affected context

This vulnerability arises in Metabase deployments where application users are granted permissions to create or modify database connection configurations, specifically Snowflake connections.

The risk is present when Metabase relies on the vulnerable Snowflake JDBC driver and treats driver-level file operations as trusted, allowing external servers to influence filesystem writes.

Environments that mix administrative data-source configuration rights with production Metabase instances are particularly exposed, especially when no additional controls constrain where driver components can write or be loaded from.

Exploit preconditions

  • Attack surface: Metabase administrative UI or API endpoints used to configure database connections
  • Required access: Valid Metabase account with permission to add or edit database connections (no host OS access required)
  • Trigger point: Creation or modification of a Snowflake connection targeting an attacker-controlled Snowflake-compatible endpoint that abuses the JDBC driver's file-handling behavior
  • Why exploitation is possible: The Snowflake JDBC driver can write arbitrary files on the Metabase host without enforcing safe paths, allowing replacement of Metabase driver components that are later loaded and executed by the Metabase process

Why this happens

The underlying issue maps to CWE-73: External Control of File Name or Path.

The Snowflake JDBC driver accepts file-related parameters or responses influenced by an external server and uses them to construct paths and perform write operations on the host filesystem.

Metabase, in turn, exposes this driver behavior through its database configuration interface, implicitly trusting the driver's file operations without constraining target directories or enforcing strict path validation.

This combination of externally controlled file paths and unrestricted write capability enables attackers to place or overwrite executable artifacts that Metabase later loads, turning a configuration-level flaw into full remote code execution.

Potential impact

  • Remote code execution within the Metabase server process
  • Complete compromise of Metabase application data and configuration
  • Theft or manipulation of analytics data, dashboards, and query results
  • Pivoting from the Metabase host to other internal systems reachable from that machine
  • Persistent backdoor installation through malicious driver or plugin artifacts

General mitigation guidance

Effective mitigation focuses on separating untrusted configuration inputs from filesystem operations and constraining driver behavior.

Common defensive patterns include:

  • Restricting which users can create or modify database connections, treating such permissions as highly privileged administration rights
  • Enforcing strict allowlists for driver file directories and preventing any file writes outside controlled, non-executable locations
  • Hardening plugin and driver loading mechanisms so that only signed, vetted artifacts from trusted directories can be executed
  • Reducing the privilege of the Metabase process and its host account to minimize the impact of any arbitrary file write, especially to executable paths
  • Applying secure-by-default configuration policies where external data sources cannot control local filenames, paths, or driver installation behaviors

How teams detect issues like this

Organizations can detect and monitor similar risks with layered approaches:

  • Static analysis or dependency review to identify components that perform filesystem writes based on externally controlled inputs or connection parameters
  • Configuration audits to flag data-source drivers that have elevated capabilities (e.g., self-updating, plugin installation, or local file management)
  • Log-based monitoring for unusual file creation or modification events originating from application processes, especially in driver or plugin directories
  • Code review practices focused on areas where external systems (like databases or data warehouses) influence local file paths or driver loading logic
  • Use of automated security scanners or SCA tools to highlight known-vulnerable JDBC or database drivers and enforce upgrade or replacement policies

Sources

SourceLink
github.comgithub.com/metabase/metabase/security/advisories/GHSA-r6x2-rchx-q9g9

Frequently asked

questions

Exploitation is constrained to users who can add or edit database connections in Metabase, but within that scope it can provide full remote code execution on the Metabase host. In many deployments, such permissions are granted to analysts or administrators, which can significantly widen the practical attack surface.

The attacker needs a valid Metabase user account with the ability to configure or modify database connections, particularly to set up Snowflake connections. No direct OS-level access or shell access is required; exploitation occurs entirely through Metabase's configuration interface.

The safest pattern is to ensure that external components like JDBC drivers cannot perform unrestricted file writes based on attacker-controlled inputs, combined with hardening of driver loading so that only trusted, signed artifacts from fixed directories are executed. Additionally, treat database connection configuration as a highly privileged operation and restrict it accordingly.

Prevention relies on rigorous review of third-party libraries for filesystem and execution capabilities, strong path validation and directory confinement for all file operations, least-privilege process execution, and clear separation between configuration data and executable artifacts. Incorporating these checks into dependency management, code review, and security testing workflows helps avoid reintroducing similar arbitrary file write and RCE vectors.

Find out what's already
exploitable in your codebase.