Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade smol-toml to version 1.6.1 or higher.
smol-toml is an A small, fast, and correct TOML parser/serializer
Affected versions of this package are vulnerable to Uncontrolled Recursion. An attacker can cause the application to crash by submitting TOML documents containing thousands of consecutive commented lines, which triggers uncontrolled recursion and results in a stack overflow.
This vulnerability can be mitigated by wrapping all invocations of parse and stringify in a try/catch block when dealing with untrusted user input.
require("smol-toml").parse('# comment\n'.repeat(8000) + 'key = "value"')