/

CVE-2026-35167

Severity:

HIGH RISK

(7.1)

Path Traversal in Kedro Data Catalog

CVE-2026-35167

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized File Read and Data Tampering

Severity:

HIGH RISK

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

Kedro's version handling logic constructs filesystem paths directly from user-supplied version strings without sanitization, allowing directory traversal sequences like ../ to be preserved.

In deployments where an attacker can influence the version parameter, this can cause Kedro to read or load data from files outside the intended versioned dataset directory, risking unauthorized file access, data poisoning, or cross-tenant data leakage.

Affected context

This issue affects Kedro-based pipelines and applications that:

  • Use versioned datasets and rely on Kedro's DataCatalog or CLI to manage versions
  • Accept version identifiers from external or semi-trusted sources (e.g., API parameters, user input, orchestration metadata)
  • Run with filesystem access to sensitive directories adjacent to or above the dataset storage root

The vulnerability is triggered when Kedro constructs versioned paths via _get_versioned_path() in kedro/io/core.py, which interpolates the version string directly into the path without normalizing or rejecting traversal components.

Exploit preconditions

  • Attack surface:
  • Programmatic API calls such as:
  • catalog.load(dataset_name, version=...)
  • DataCatalog.from_config(..., load_versions=...)
  • CLI usage such as:
  • kedro run --load-versions=dataset:../../../secrets
  • Required access: Ability to influence or supply the version string (directly or indirectly) to the Kedro process; typically via configuration, job parameters, environment variables, HTTP endpoints, or orchestration tools that plug into Kedro.
  • Trigger point: Any dataset load operation that results in _get_versioned_path() being invoked with a crafted version string containing path traversal sequences.
  • Why exploitation is possible: The version value is treated as a raw path component without validation or normalization, so sequences like ../ are honored by the filesystem, allowing access to files outside the intended versioned dataset directory.

Why this happens

The root cause is unchecked interpolation of untrusted input into filesystem paths, corresponding to CWE-22: Path Traversal.

Instead of treating the version string as a logical identifier that must be canonicalized and constrained to a specific directory, _get_versioned_path() directly appends the version value to the dataset path. This allows directory traversal tokens (such as ../) or absolute/relative path tricks to modify the effective target location.

The underlying insecure pattern is:

  • Using user-controllable data as part of a filesystem path
  • Failing to normalize paths and verify they remain within an allowed base directory
  • Not enforcing a strict format for version identifiers (e.g., timestamps, UUIDs, or whitelisted patterns)

Potential impact

  • Unauthorized reading of files from directories outside the intended versioned dataset location
  • Data poisoning by loading attacker-controlled files as if they were trusted dataset versions
  • Cross-tenant data access in shared environments where multiple users or projects share the same Kedro infrastructure
  • Exposure of configuration files, credentials, or secrets accidentally accessible via filesystem reads
  • Undermining of data lineage and reproducibility guarantees by silently loading the wrong sources

General mitigation guidance

Effective mitigation focuses on constraining how version identifiers are mapped to filesystem paths and reducing trust in externally supplied values:

  • Treat version strings as logical identifiers, not raw path fragments; enforce strict formats (e.g., regex-validated timestamps, hashes, or UUIDs).
  • Normalize and canonicalize constructed paths, then verify they remain within the expected base directory before reading or writing.
  • Reject version values that contain path separators, traversal sequences, or other unsafe characters.
  • Encapsulate all path construction behind a single, well-reviewed API that applies these checks consistently across catalog, configuration, and CLI entry points.
  • Run Kedro processes with least-privilege filesystem permissions so they cannot read or write beyond the directories required for datasets.
  • Avoid passing raw user input directly into load_versions or version parameters; instead map external inputs to known-safe internal identifiers.

How teams detect issues like this

Detection involves both code-level inspection and runtime monitoring:

  • Static analysis and review:
  • Search for functions that construct paths using user-controlled values, especially version parameters or load_versions mappings.
  • Flag any use of string concatenation or interpolation to build paths from unvalidated parameters in kedro/io/core.py and related catalog code.
  • Define secure coding guidelines and linters that prohibit direct inclusion of untrusted values in filesystem paths without validation and base-directory checks.
  • Configuration and pipeline review:
  • Review pipeline configurations, orchestration scripts, and CLI wrappers that accept version or load_versions parameters from external sources.
  • Look for patterns where arbitrary user input is mapped directly to Kedro version strings.
  • Runtime monitoring:
  • Log the resolved dataset paths being accessed, and alert when paths escape expected base directories or contain traversal sequences.
  • Use host-based monitoring to flag unusual reads of sensitive directories by Kedro processes.
  • Automated tools (SAST/secret scanners/CI checks) can be configured with custom rules to detect path traversal patterns and unsafe path construction before deployment.

Sources

SourceLink
github.comgithub.com/kedro-org/kedro/pull/5442
github.comgithub.com/kedro-org/kedro/security/advisories/GHSA-6326-w46w-ppjw

Frequently asked

questions

It can be, depending on how Kedro is integrated. If a web service, API, or orchestration layer exposes a way for external users or upstream systems to influence dataset version parameters, an attacker may exploit this remotely by supplying crafted version values.

The attacker must be able to control or significantly influence the version string passed into Kedro (via version, load_versions, or CLI arguments). They do not need shell access if there is any application or workflow that forwards their input into these parameters.

Constrain version identifiers to a well-defined, validated format and ensure all computed paths are normalized and checked against an allowed base directory before use. In practice, this means treating versions as opaque identifiers (e.g., timestamps, UUIDs) and rejecting any value containing path separators or traversal tokens.

Establish a rule that no user-controlled data is ever used directly in filesystem paths, URLs, or other resource locators without strict validation and canonicalization. Centralize path construction in utility functions, enforce least-privilege directory permissions for data processes, add automated checks for path traversal patterns in CI, and review any new feature that maps external parameters to internal resource identifiers.

Find out what's already
exploitable in your codebase.