Python lsp server: UltraJSON has an integer overflow handling large indent leads to buffer overflow or infinite loop (CVE-2026-32875)
CVE-2026-32875 is a vulnerability in the UltraJSON (ujson) library used by python-lsp-server where integer overflow or underflow in handling the 'indent' parameter during JSON serialization can cause a segmentation fault (crash) or an infinite loop. This occurs when the product of the indent value and the nested depth exceeds the 32-bit integer limit or when a large negative indent is used. The issue can lead to denial of service. The vulnerability affects python-lsp-server versions >=1.6.0 and <1.14.0_1. A patch is available in ujson 5.12.0 that fixes the overflow and caps the indent value.
AI Analysis
Technical Summary
The vulnerability arises from integer overflow/underflow in UltraJSON's handling of the 'indent' parameter in functions like ujson.dumps(). When the indent multiplied by the nested depth of the input exceeds INT32_MAX, a segmentation fault occurs. Additionally, large negative indent values can cause an infinite loop due to underflow. Exploitation requires control over the indent parameter with untrusted input and lack of restrictions on indent size. The maintainers fixed the issue in ujson 5.12.0 by promoting integer types to prevent overflow, skipping indentation code for negative indents, and capping indent at 1000. Workarounds include using fixed or no indentation or ensuring indent is non-negative and reasonably small.
Potential Impact
Successful exploitation can cause denial of service by crashing the Python interpreter or causing it to hang in an infinite loop. There is no impact on confidentiality or integrity. The vulnerability requires that untrusted users control the indent parameter without restrictions. The CVSS v3.1 score is 7.5 (high) with attack vector network, low attack complexity, no privileges required, no user interaction, and impact limited to availability.
Mitigation Recommendations
A patch is available in ujson version 5.12.0 which fixes the integer overflow/underflow issues and caps the indent parameter to 1000. Users of python-lsp-server should upgrade to a version that includes this fixed ujson version (>=1.14.0_1). If upgrading is not possible, users should avoid passing untrusted or large indent values, use fixed or no indentation, and ensure indent is non-negative and below the threshold calculated as 2^31 divided by the maximum recursion depth.
Python lsp server: UltraJSON has an integer overflow handling large indent leads to buffer overflow or infinite loop (CVE-2026-32875)
Description
CVE-2026-32875 is a vulnerability in the UltraJSON (ujson) library used by python-lsp-server where integer overflow or underflow in handling the 'indent' parameter during JSON serialization can cause a segmentation fault (crash) or an infinite loop. This occurs when the product of the indent value and the nested depth exceeds the 32-bit integer limit or when a large negative indent is used. The issue can lead to denial of service. The vulnerability affects python-lsp-server versions >=1.6.0 and <1.14.0_1. A patch is available in ujson 5.12.0 that fixes the overflow and caps the indent value.
CVSS v3.1
Score 7.5high
Affected software
pkg:brew/python-lsp-serverRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from integer overflow/underflow in UltraJSON's handling of the 'indent' parameter in functions like ujson.dumps(). When the indent multiplied by the nested depth of the input exceeds INT32_MAX, a segmentation fault occurs. Additionally, large negative indent values can cause an infinite loop due to underflow. Exploitation requires control over the indent parameter with untrusted input and lack of restrictions on indent size. The maintainers fixed the issue in ujson 5.12.0 by promoting integer types to prevent overflow, skipping indentation code for negative indents, and capping indent at 1000. Workarounds include using fixed or no indentation or ensuring indent is non-negative and reasonably small.
Potential Impact
Successful exploitation can cause denial of service by crashing the Python interpreter or causing it to hang in an infinite loop. There is no impact on confidentiality or integrity. The vulnerability requires that untrusted users control the indent parameter without restrictions. The CVSS v3.1 score is 7.5 (high) with attack vector network, low attack complexity, no privileges required, no user interaction, and impact limited to availability.
Mitigation Recommendations
A patch is available in ujson version 5.12.0 which fixes the integer overflow/underflow issues and caps the indent parameter to 1000. Users of python-lsp-server should upgrade to a version that includes this fixed ujson version (>=1.14.0_1). If upgrading is not possible, users should avoid passing untrusted or large indent values, use fixed or no indentation, and ensure indent is non-negative and below the threshold calculated as 2^31 divided by the maximum recursion depth.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-python-lsp-server-CVE-2026-32875
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6aac8e0155bf5e2cf5490380
Added to database: 09/18/2026, 01:04:01 UTC
Last enriched: 09/18/2026, 01:31:32 UTC
Last updated: 09/18/2026, 01:31:32 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.