Kedro has Arbitrary Code Execution via Malicious Logging Configuration

Description

Impact

This is a critical remote code execution (RCE) vulnerability caused by unsafe use of logging.config.dictConfig() with user-controlled input.

Kedro allows the logging configuration file path to be set via the KEDRO_LOGGING_CONFIG environment variable and loads it without validation. The logging configuration schema supports the special () key, which enables arbitrary callable instantiation. An attacker can exploit this to execute arbitrary system commands during application startup.


Patches

The vulnerability is fixed by introducing validation that rejects the unsafe () factory key in logging configurations before passing them to dictConfig().

Fixed in

  • Kedro 1.3.0

Users should upgrade to this version as soon as possible.


Workarounds

If upgrading is not immediately possible:

  • Do not allow untrusted input to control the KEDRO_LOGGING_CONFIG environment variable
  • Restrict write access to logging configuration files
  • Avoid using externally supplied or dynamically generated logging configs
  • Manually validate logging YAML to ensure it does not contain the () key

These mitigations reduce risk but do not fully eliminate it.


References

  • Python logging configuration documentation: https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
  • CWE-94: Code Injection — https://cwe.mitre.org/data/definitions/94.html

Basic information

Type
reviewed
Severity
critical
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-04-03 03:48:48 UTC
Updated
2026-06-06 00:23:46 UTC
GitHub reviewed
2026-04-03 03:48:48 UTC
NVD published
2026-04-06

EPSS Score

Score Percentile
0.20% 41.98%

CVSS Scores

Base score Version Severity Vector
9.8 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.

Identifiers

CWEs

CWE id Name
CWE-94 Improper Control of Generation of Code ('Code Injection')
CWE-502 Deserialization of Untrusted Data

Credits

  • Wernerina (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
pip kedro < 1.3.0 1.3.0

References

cvelogic Threat Intelligence