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 applicationsLearn about Integer Overflow or Wraparound vulnerabilities in an interactive lesson.
Start learningUpgrade ujson to version 5.12.0 or higher.
ujson is an Ultra fast JSON encoder and decoder for Python
Affected versions of this package are vulnerable to Integer Overflow or Wraparound via the indent parameter in the dumps(), dump(), or encode() functions. An attacker can cause a crash or infinite loop by supplying large or negative values for indent, leading to excessive memory allocation or unbounded processing.
This vulnerability can be mitigated by using a fixed, non-negative, and reasonably small value for the indent parameter (below 2**31/max_recursion_depth_as_limited_by_stack_size), or by disabling indentation altogether.