# CVE-2021-45958: ujson: UltraJSON (aka ujson) through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from en...

CVE-2021-45958 is fixed in 3 products on 1 platform, first by python3-ujson 1.35-4ubuntu0.1, released December 31, 2021. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2021-45958
- Priority: Routine
- CVSS: 5.5 (medium)
- EPSS: 0.0167
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Dec 31, 2021

## Description

UltraJSON (aka ujson) through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from encode). Exploitation can, for example, use a large amount of indentation.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | python-ujson Ubuntu 18.04.6 LTS (bionic) | 1.35-2ubuntu0.1~esm1 | [python-ujson 1.35-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python-ujson-1.35-2ubuntu0.1-esm1.md) | Jul 5, 2022 |
| Linux | python3-ujson Ubuntu 18.04.6 LTS (bionic) | 1.35-2ubuntu0.1~esm1 | [python3-ujson 1.35-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-python3-ujson-1.35-2ubuntu0.1-esm1.md) | Jul 5, 2022 |
| Linux | python3-ujson Ubuntu 20.04 LTS (focal) | 1.35-4ubuntu0.1 | [python3-ujson 1.35-4ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-python3-ujson-1.35-4ubuntu0.1.md) | Dec 31, 2021 |
| Linux | python3-ujson Ubuntu 22.04.1 LTS (jammy) | 5.1.0-1ubuntu0.1~esm1 | [python3-ujson 5.1.0-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-python3-ujson-5.1.0-1ubuntu0.1-esm1.md) | Jul 5, 2022 |
| Linux | ujson Debian 12.15 (bookworm) | 5.2.0-1 | [DEBIAN-CVE-2021-45958](https://patchblox.com/security/data/fix/linux/debian-cve-2021-45958.md) | Jan 1, 2022 |
| Linux | ujson Debian 13.5 (trixie) | 5.2.0-1 | [DEBIAN-CVE-2021-45958](https://patchblox.com/security/data/fix/linux/debian-cve-2021-45958.md) | Jan 1, 2022 |
| Linux | ujson Debian 14 | 5.2.0-1 | [DEBIAN-CVE-2021-45958](https://patchblox.com/security/data/fix/linux/debian-cve-2021-45958.md) | Jan 1, 2022 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
