Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. ujson
  4. ›
  5. CVE-2026-32875

CVE-2026-32875: UltraJSON has an integer overflow handling large indent leads to buffer overflow or infinite loop

March 18, 2026 (updated March 20, 2026)

ujson.dumps() crashes the Python interpreter (segmentation fault) when the product of the indent parameter and the nested depth of the input exceeds INT32_MAX. It can also get stuck in an infinite loop if the indent is a large negative number. Both are caused by an integer overflow/underflow whilst calculating how much memory to reserve for indentation. And both can be used to achieve denial of service.

(Note: A negative indent to ujson means add spaces after colons but do not add line breaks or indentation. It is unclear to the current maintainers whether this was ever even an intended feature or just a byproduct of the way it was written.)

References

  • github.com/advisories/GHSA-c8rr-9gxc-jprv
  • github.com/ultrajson/ultrajson
  • github.com/ultrajson/ultrajson/commit/486bd4553dc471a1de11613bc7347a6b318e37ea
  • github.com/ultrajson/ultrajson/issues/700
  • github.com/ultrajson/ultrajson/security/advisories/GHSA-c8rr-9gxc-jprv
  • nvd.nist.gov/vuln/detail/CVE-2026-32875

Code Behaviors & Features

Detect and mitigate CVE-2026-32875 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 5.1.0 before 5.12.0

Fixed versions

  • 5.12.0

Solution

Upgrade to version 5.12.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-190: Integer Overflow or Wraparound
  • CWE-787: Out-of-bounds Write
  • CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

Source file

pypi/ujson/CVE-2026-32875.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 24 Mar 2026 12:16:46 +0000.