Intel

AIKIDO-2026-525182

tomlkit is vulnerable to Uncontrolled Recursion

Uncontrolled Recursion Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 5 days ago

53

Medium Risk

This Affects:

PYTHONtomlkit
0.1.0 - 0.15.0
Fixed in 0.15.1
Are you affected? Scan for Free

TL;DR

The TOML parser parses nested arrays, nested inline tables, and dotted keys recursively, and every nesting level or dotted-key fragment adds a level of recursion without any depth limit. Crafted deeply nested input drives this recursion until it exhausts the interpreter stack. Before the fix, such input crashed the parsing process with an uncontrolled RecursionError, allowing a denial of service against any application that parses attacker-controlled TOML. The fix enforces a maximum nesting depth of 100 for values and dotted-key fragments and raises a ParseError instead of recursing without bound.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and parse untrusted or attacker-controlled TOML input.

Background info

tomlkit is vulnerable to Uncontrolled Recursion in versions 0.1.0 - 0.15.0.

How to fix this

Upgrade the tomlkit library to the patch version.