/

CVE-2026-33725

Severity:

HIGH RISK

(7.2)

Unsafe Deserialization in Metabase Enterprise H2 Sync

CVE-2026-33725

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution and Arbitrary File Read

Severity:

HIGH RISK

(7.2)

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 Enterprise contains an unsafe serialization import pathway that lets authenticated admins craft archives which manipulate the H2 JDBC configuration and inject an INIT property.

When such a malicious archive is imported, arbitrary SQL can run during database synchronization, enabling remote code execution and arbitrary file reads on the Metabase server under certain configurations.

Affected context

This vulnerability affects Metabase Enterprise deployments that expose the /api/ee/serialization/import endpoint and allow admin users to import configuration or serialization archives.

The issue occurs specifically when deserialized data is trusted to populate H2 JDBC connection properties, including the INIT parameter, which H2 interprets and executes during database initialization or synchronization.

Metabase OSS instances are not impacted because they do not include the enterprise serialization code paths.

Exploit preconditions

  • Attack surface: HTTP API endpoint POST /api/ee/serialization/import on Metabase Enterprise.
  • Required access: Authenticated Metabase admin-level account (local or cloud-hosted).
  • Trigger point: Importing a crafted serialization archive that injects a malicious INIT property into the H2 JDBC specification.
  • Why exploitation is possible: The serialization import mechanism treats attacker-controlled serialized content as trusted configuration and passes it through to H2 without sufficiently constraining or sanitizing the INIT parameter, allowing H2 to execute arbitrary SQL that can be leveraged for RCE and file reads depending on server configuration.

Why this happens

The root cause is an unsafe deserialization and configuration binding pattern in the enterprise serialization import feature.

User-provided serialization archives are deserialized and used to reconstruct Metabase configuration, including JDBC connection details for H2.

This behavior aligns with CWE-502: Deserialization of Untrusted Data, where serialized input from a potentially adversarial source is accepted, parsed, and directly used to influence runtime behavior.

By allowing a serialized object to define the H2 INIT property, the application effectively embeds executable SQL instructions into connection setup logic, crossing the boundary between data and code and enabling high-impact side effects such as remote code execution and arbitrary file access.

Potential impact

  • Remote code execution on the Metabase application server, subject to the runtime's OS-level privileges and environment.
  • Arbitrary file read on the server filesystem, which could expose configuration files, credentials, or other sensitive data.
  • Unauthorized access to or modification of data in connected databases via injected SQL.
  • Lateral movement or further compromise within the hosting environment if RCE is chained with other weaknesses.
  • Disclosure of secrets that may enable compromise of related services or infrastructure.

General mitigation guidance

Mitigation should focus on eliminating unsafe deserialization and restricting how imported content can influence database configuration:

  • Treat all serialized input as untrusted and avoid directly binding deserialized structures to JDBC connection properties or other sensitive runtime configuration.
  • Introduce strict schema validation for imported archives, permitting only a minimal, well-defined set of fields and explicitly disallowing parameters like H2 INIT or any other execution-capable properties.
  • Apply a "configuration allowlist" approach where connection options must be chosen from predefined safe sets rather than arbitrary user-specified values.
  • Separate configuration concerns so that complex or dangerous DB-level features (e.g., initialization commands) cannot be toggled via importable data.
  • Run the Metabase application with least-privilege OS accounts and minimal filesystem access to limit the blast radius of any file read or RCE condition.
  • Where feasible, isolate Metabase in hardened containers or sandboxes so that database initialization or sync logic cannot be used to escalate privileges beyond the service scope.

How teams detect issues like this

Detection efforts can combine code-centric and operational approaches:

  • Static analysis: Flag deserialization or object mapping code that:
  • Accepts uploaded/archive data and binds it directly into configuration or connection objects.
  • Allows user-controlled values to populate JDBC URLs or properties like INIT, AUTO_SERVER, or similar special parameters.
  • Code review signals:
  • Serialization/import features that reconstruct complex application state, especially database connections, from user-supplied archives.
  • Absence of explicit allowlists or schema validation for imported configuration fields.
  • Direct hand-off of deserialized config to third-party libraries (like H2) without intermediate validation or normalization.
  • Runtime monitoring:
  • Log and alert on unusual or newly observed values in JDBC URLs or connection properties, particularly those that invoke H2 initialization commands.
  • Track access to the POST /api/ee/serialization/import endpoint and flag atypical usage patterns, large or frequent imports, and imports originating from unfamiliar admin accounts or IP ranges.
  • Monitor server behavior for unexpected shell commands, file access anomalies, or SQL statements that appear unrelated to normal analytics workflows.
  • Security tooling:
  • Apply SAST and dependency-aware scanners configured to recognize unsafe deserialization patterns and high-risk configuration flows.
  • Use WAF or API gateways with rules that can constrain or inspect serialization import requests for suspicious payload characteristics where feasible.

Sources

SourceLink
github.comgithub.com/metabase/metabase/security/advisories/GHSA-fppj-vcm3-w229

Frequently asked

questions

Exploitation is limited to environments where an attacker can obtain admin-level access to a Metabase Enterprise instance that exposes the serialization import endpoint.

It is not a drive-by remote exploit but is serious in scenarios where admin accounts can be phished, shared, or otherwise compromised.

Yes. The attack requires a valid authenticated admin user in Metabase Enterprise to submit a crafted archive to POST /api/ee/serialization/import.

Without admin access or equivalent control over the enterprise API, the vulnerable code path is not normally reachable.

The safest approach is to avoid deserializing untrusted data into complex runtime objects and never let deserialized content directly drive security-sensitive configuration such as JDBC URLs or H2 INIT properties.

Instead, employ strict schema validation, enforce allowlists for configuration fields, and decouple importable data from low-level database or execution settings.

To prevent comparable flaws, design import and serialization features with clear trust boundaries, treat all external inputs as untrusted, and prohibit them from enabling execution or configuration of powerful database features.

Combine secure design reviews, targeted static analysis for deserialization and configuration flows, and mandatory security checks in CI/CD pipelines to catch unsafe patterns before release.

Find out what's already
exploitable in your codebase.