/

CVE-2026-102523

Severity:

HIGH RISK

(8.0)

Path Traversal (CWE-73) in MariaDB Partition Conversion

CVE-2026-102523

Received

Vulnerability type

Category:

Path Traversal

CWE:

CWE-73

Impact:

Unauthorized file access and table data modification

Severity:

HIGH RISK

(8.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

MariaDB's partition conversion operation can use user-supplied partition names to construct filesystem paths without applying the required filename encoding. An authenticated database user may be able to access or modify table files they are not authorized to use when a partition name requires escaping.

MariaDB's partition conversion operation can use user-supplied partition names to construct filesystem paths without applying the required filename encoding. An authenticated database user may be able to access or modify table files they are not authorized to use when a partition name requires escaping.

Affected context

The issue occurs in MariaDB Server when ALTER TABLE ... CONVERT ... PARTITION processes user-specified partition names and constructs filesystem paths from them. Risk depends on the operation being available to an authenticated user and on the supplied name requiring filename escaping. The vulnerability affects MariaDB releases with the vulnerable implementation; fixes are identified in the release lines listed in the advisory.

The issue occurs in MariaDB Server when ALTER TABLE ... CONVERT ... PARTITION processes user-specified partition names and constructs filesystem paths from them. Risk depends on the operation being available to an authenticated user and on the supplied name requiring filename escaping. The vulnerability affects MariaDB releases with the vulnerable implementation; fixes are identified in the release lines listed in the advisory.

Exploit preconditions

  • Attack surface: MariaDB's ALTER TABLE ... CONVERT ... PARTITION operation
  • Required access: An authenticated database account able to invoke the relevant operation
  • Trigger point: Processing a user-specified partition name during partition conversion
  • Why exploitation is possible: The name is used in filesystem path construction without the required filename encoding, potentially directing access to table files outside the user's authorization
  • Attack surface: MariaDB's ALTER TABLE ... CONVERT ... PARTITION operation
  • Required access: An authenticated database account able to invoke the relevant operation
  • Trigger point: Processing a user-specified partition name during partition conversion
  • Why exploitation is possible: The name is used in filesystem path construction without the required filename encoding, potentially directing access to table files outside the user's authorization

Why this happens

The server uses externally controlled partition names when constructing filesystem paths but does not apply the filename encoding needed to safely represent those names. This is an improper control of filenames or paths, mapped to CWE-73: External Control of File Name or Path. As a result, a database operation may resolve to files beyond the intended table files.

The server uses externally controlled partition names when constructing filesystem paths but does not apply the filename encoding needed to safely represent those names. This is an improper control of filenames or paths, mapped to CWE-73: External Control of File Name or Path. As a result, a database operation may resolve to files beyond the intended table files.

Potential impact

  • An authenticated user may read table data they are not authorized to access.
  • An authenticated user could modify or otherwise affect unauthorized table files.
  • Data integrity or confidentiality across database tables may be compromised.
  • An authenticated user may read table data they are not authorized to access.
  • An authenticated user could modify or otherwise affect unauthorized table files.
  • Data integrity or confidentiality across database tables may be compromised.

General mitigation guidance

Defensive approaches focus on ensuring that user-controlled identifiers cannot influence filesystem paths outside their intended scope.

  • Apply consistent filename encoding or use safe internal identifiers when mapping partition names to files.
  • Canonicalize and validate resolved paths, and ensure they remain within the intended table directory.
  • Prefer APIs that operate on validated database objects rather than constructing paths from raw names.
  • Restrict which accounts can invoke partition conversion operations, following least-privilege principles.
  • Treat partition names and other database metadata as untrusted when crossing into filesystem operations.

Defensive approaches focus on ensuring that user-controlled identifiers cannot influence filesystem paths outside their intended scope.

  • Apply consistent filename encoding or use safe internal identifiers when mapping partition names to files.
  • Canonicalize and validate resolved paths, and ensure they remain within the intended table directory.
  • Prefer APIs that operate on validated database objects rather than constructing paths from raw names.
  • Restrict which accounts can invoke partition conversion operations, following least-privilege principles.
  • Treat partition names and other database metadata as untrusted when crossing into filesystem operations.

How teams detect issues like this

  • Review filesystem path construction that incorporates partition names or other user-controlled database identifiers.
  • Use static analysis to flag path-building code that lacks encoding, canonicalization, or containment checks.
  • Audit authorization rules for partition conversion operations and monitor their use by database accounts.
  • Apply code-review and policy checks requiring safe path APIs and validation at filesystem boundaries.
  • Review filesystem path construction that incorporates partition names or other user-controlled database identifiers.
  • Use static analysis to flag path-building code that lacks encoding, canonicalization, or containment checks.
  • Audit authorization rules for partition conversion operations and monitor their use by database accounts.
  • Apply code-review and policy checks requiring safe path APIs and validation at filesystem boundaries.

Sources

SourceLink
github.comgithub.com/MariaDB/server/commit/98437c30ae52ed709f266e5f8095d779261a5879
github.comgithub.com/MariaDB/server/releases/tag/mariadb-10.11.19
github.comgithub.com/MariaDB/server/releases/tag/mariadb-11.4.13
github.comgithub.com/MariaDB/server/releases/tag/mariadb-11.8.9
github.comgithub.com/MariaDB/server/releases/tag/mariadb-12.3.3
github.comgithub.com/MariaDB/server/releases/tag/mariadb-13.0.2
github.comgithub.com/MariaDB/server/security/advisories/GHSA-h4vr-wpff-jfx4
jira.mariadb.orgjira.mariadb.org/browse/MDEV-40413

Frequently asked

questions

The described attack requires an authenticated database user who can invoke the relevant partition conversion operation.

The described attack surface is a MariaDB SQL operation; direct host access is not stated as a prerequisite.

Avoid building filesystem paths directly from raw partition names. Use safe identifiers, appropriate filename encoding, and path containment checks.

Treat database-provided names as untrusted at filesystem boundaries, enforce least privilege for sensitive operations, and review path construction for missing validation or encoding.

The described attack requires an authenticated database user who can invoke the relevant partition conversion operation.

The described attack surface is a MariaDB SQL operation; direct host access is not stated as a prerequisite.

Avoid building filesystem paths directly from raw partition names. Use safe identifiers, appropriate filename encoding, and path containment checks.

Treat database-provided names as untrusted at filesystem boundaries, enforce least privilege for sensitive operations, and review path construction for missing validation or encoding.

Find out what's already
exploitable in your codebase.