/

CVE-2026-104103

Severity:

HIGH RISK

(8.1)

Archive Path Traversal (CWE-22) in Ludwig Dataset Loader

CVE-2026-104103

Awaiting Analysis

Vulnerability type

Category:

Archive Path Traversal

CWE:

CWE-22, CWE-59

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(8.1)

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

Ludwig's archive extraction logic can be bypassed by crafted symlink or hard-link members, allowing files written during extraction to escape the intended destination directory. An attacker may place controlled content at arbitrary filesystem paths when a user processes an archive from an attacker-controlled or compromised source.

Ludwig's archive extraction logic can be bypassed by crafted symlink or hard-link members, allowing files written during extraction to escape the intended destination directory. An attacker may place controlled content at arbitrary filesystem paths when a user processes an archive from an attacker-controlled or compromised source.

Affected context

The issue occurs in Ludwig dataset-loading workflows that download and extract configured archives on supported Python 3.12 or 3.13 runtimes. Risk is present when archive contents are not fully checked for symlink and hard-link escape behavior and when the extraction process has write permissions beyond its intended dataset directory. Python runtimes with tar extraction filters that reject escaping links may reduce this specific exposure.

The issue occurs in Ludwig dataset-loading workflows that download and extract configured archives on supported Python 3.12 or 3.13 runtimes. Risk is present when archive contents are not fully checked for symlink and hard-link escape behavior and when the extraction process has write permissions beyond its intended dataset directory. Python runtimes with tar extraction filters that reject escaping links may reduce this specific exposure.

Exploit preconditions

  • Attack surface: Dataset archive download and extraction
  • Required access: Ability to cause a user or service to process an archive from an attacker-controlled or compromised source
  • Trigger point: Extraction of crafted tar members during dataset loading
  • Why exploitation is possible: Symlink and hard-link targets are not adequately contained, and the path check can accept sibling paths that merely share the destination's character prefix
  • Attack surface: Dataset archive download and extraction
  • Required access: Ability to cause a user or service to process an archive from an attacker-controlled or compromised source
  • Trigger point: Extraction of crafted tar members during dataset loading
  • Why exploitation is possible: Symlink and hard-link targets are not adequately contained, and the path check can accept sibling paths that merely share the destination's character prefix

Why this happens

The vulnerability results from incomplete archive-member validation before extraction. The implementation checks ordinary member names but does not apply equivalent containment checks to symbolic-link and hard-link targets, allowing a later archive member to write through an escaping link. The use of os.path.commonprefix also performs character-based rather than path-component-aware validation. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with a related CWE-59: Improper Link Resolution Before File Access condition.

The vulnerability results from incomplete archive-member validation before extraction. The implementation checks ordinary member names but does not apply equivalent containment checks to symbolic-link and hard-link targets, allowing a later archive member to write through an escaping link. The use of os.path.commonprefix also performs character-based rather than path-component-aware validation. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with a related CWE-59: Improper Link Resolution Before File Access condition.

Potential impact

  • An attacker-controlled archive may write files outside the intended extraction directory
  • Configuration, startup, or application files may be overwritten
  • The extracting process may experience code execution indirectly if a writable executable or configuration path is targeted
  • Dataset integrity and model-building workflows could be compromised
  • Host or service confidentiality and availability could be affected
  • An attacker-controlled archive may write files outside the intended extraction directory
  • Configuration, startup, or application files may be overwritten
  • The extracting process may experience code execution indirectly if a writable executable or configuration path is targeted
  • Dataset integrity and model-building workflows could be compromised
  • Host or service confidentiality and availability could be affected

General mitigation guidance

Mitigation generally focuses on treating archives as untrusted input and enforcing containment for every member type.

Common defensive patterns include:

  • Use archive extraction APIs with secure, platform-supported data filters
  • Resolve and validate regular files, directories, symbolic links, and hard links against the intended destination using path-aware containment checks
  • Reject absolute paths, escaping link targets, and ambiguous or malformed archive entries
  • Prefer extraction into isolated, temporary directories before publishing validated contents
  • Restrict archive-processing privileges and filesystem write access to the minimum required locations
  • Use trusted, integrity-verified archive sources and avoid silently following links during extraction

Mitigation generally focuses on treating archives as untrusted input and enforcing containment for every member type.

Common defensive patterns include:

  • Use archive extraction APIs with secure, platform-supported data filters
  • Resolve and validate regular files, directories, symbolic links, and hard links against the intended destination using path-aware containment checks
  • Reject absolute paths, escaping link targets, and ambiguous or malformed archive entries
  • Prefer extraction into isolated, temporary directories before publishing validated contents
  • Restrict archive-processing privileges and filesystem write access to the minimum required locations
  • Use trusted, integrity-verified archive sources and avoid silently following links during extraction

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis rules for archive extraction APIs used without secure filters or complete member validation
  • Code review checks for commonprefix-based path containment and unchecked link targets
  • Tests containing absolute paths, parent-directory traversal, symlinks, hard links, and destination-prefix sibling paths
  • Runtime monitoring for archive extraction processes writing outside approved directories
  • Filesystem policy enforcement that limits dataset services to isolated, least-privilege write locations
  • Automated security review tools that flag unsafe archive extraction patterns and link-following behavior

Organizations can identify this class of issue through:

  • Static analysis rules for archive extraction APIs used without secure filters or complete member validation
  • Code review checks for commonprefix-based path containment and unchecked link targets
  • Tests containing absolute paths, parent-directory traversal, symlinks, hard links, and destination-prefix sibling paths
  • Runtime monitoring for archive extraction processes writing outside approved directories
  • Filesystem policy enforcement that limits dataset services to isolated, least-privilege write locations
  • Automated security review tools that flag unsafe archive extraction patterns and link-following behavior

Sources

SourceLink
github.comgithub.com/ludwig-ai/ludwig/commit/7f534f31e725cc5362c8f6f85537488443de279a
github.comgithub.com/ludwig-ai/ludwig/releases/tag/v0.17.8
github.comgithub.com/ludwig-ai/ludwig/security/advisories/GHSA-qvrm-3x4c-rcxf

Frequently asked

questions

It can be triggered through a remote archive source when a user or service is configured to download and process an attacker-controlled or compromised archive. It is not necessarily exploitable by an unauthenticated network request to Ludwig itself.

The attacker generally needs to influence the archive URL or its contents, or compromise a source that the dataset-loading workflow already trusts. The extracting process must also have permission to write to a targeted path.

Use secure archive extraction with path-component-aware containment checks for all member and link types. Reject escaping links and extract in a restricted temporary location before making validated content available.

Treat downloaded archives as untrusted, verify their provenance and integrity, test link-based archive cases, apply least-privilege filesystem permissions, and enforce runtime policies that prevent writes outside approved directories.

It can be triggered through a remote archive source when a user or service is configured to download and process an attacker-controlled or compromised archive. It is not necessarily exploitable by an unauthenticated network request to Ludwig itself.

The attacker generally needs to influence the archive URL or its contents, or compromise a source that the dataset-loading workflow already trusts. The extracting process must also have permission to write to a targeted path.

Use secure archive extraction with path-component-aware containment checks for all member and link types. Reject escaping links and extract in a restricted temporary location before making validated content available.

Treat downloaded archives as untrusted, verify their provenance and integrity, test link-based archive cases, apply least-privilege filesystem permissions, and enforce runtime policies that prevent writes outside approved directories.

Find out what's already
exploitable in your codebase.