Intel

AIKIDO-2025-10243

smol-toml is vulnerable to Uncontrolled Recursion

Uncontrolled RecursionGHSA-pqhp-25j4-6hq9 Published Apr 17, 2025

25

Low Risk

This Affects:

JSsmol-toml
1.0.0 - 1.3.2
Fixed in 1.3.3
Are you affected? Scan for Free

TL;DR

Affected versions of the smol-toml package are vulnerable to a denial of service due to unbounded recursion when parsing or stringifying deeply nested inline structures. An attacker can craft a malicious TOML input to trigger a stack overflow and crash the application. The library does not impose a maximum depth limit for parsing or stringifying, increasing the risk of availability issues. The patched version introduces a configurable depth cap (default: 1000) to mitigate this, but nevertheless, users are advised to wrap parse and stringify calls in try/catch blocks when handling untrusted input.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

smol-toml is vulnerable to Uncontrolled Recursion in versions 1.0.0 - 1.3.2.

How to fix this

Upgrade the smol-toml library to the patch version.