---
title: 'USN-6629-2: UltraJSON vulnerability | Ubuntu security notices'
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/notices/USN-6629-2
---

1. [Ubuntu Security Notices](https://ubuntu.com/security/notices)
2. USN-6629-2

---

# USN-6629-2: UltraJSON vulnerability

Publication date

14 February 2024

Overview

UltraJSON could be made to crash if it received specially crafted
input.

Releases

[20.04 LTS](https://ubuntu.com/security/notices?release=focal)

---

Open side navigation

## Packages

* [ujson](https://ubuntu.com/security/cves?package=ujson) - ultra fast JSON encoder and decoder for Python 3

## Details

USN-6629-1 fixed vulnerabilities in UltraJSON.
This update provides the corresponding updates for Ubuntu 20.04 LTS.

Original advisory details:

It was discovered that UltraJSON incorrectly handled certain input with
a large amount of indentation. An attacker could possibly use this issue
to crash the program, resulting in a denial of service. ([CVE-2021-45958](https://ubuntu.com/security/CVE-2021-45958))

Jake Miller discovered that UltraJSON incorrectly decoded certain
characters. An attacker could possibly use this issue to cause key
confusion and overwrite values in dictionaries. ([CVE-2022-31116](https://ubuntu.com/security/CVE-2022-31116))

It was discovered that UltraJSON incorrectly handled an error when
reallocating a buffer for string decoding. An attacker could possibly
use this issue to corrupt memory. ([CVE-2022-31117](https://ubuntu.com/security/CVE-2022-31117))

## Update instructions

In general, a standard system update will make all the necessary changes.

[Learn more about how to get the fixes.](https://ubuntu.com/security/cves/about#security)

The problem can be corrected by updating your system to the following package versions:

| Ubuntu Release | Package Version |
| --- | --- |
| 20.04 LTS focal | [python3-ujson](https://launchpad.net/ubuntu/+source/ujson) –  [1.35-4ubuntu0.1](https://launchpad.net/ubuntu/+source/ujson/1.35-4ubuntu0.1) | | |

---

### Reduce your security exposure

Ubuntu Pro provides ten-year security coverage to 25,000+ packages in Main and Universe repositories, and it is free for up to five machines.

[Get Ubuntu Pro](https://ubuntu.com/pro)

## References

* [CVE-2021-45958](https://ubuntu.com/security/CVE-2021-45958)

## Related notices

* [USN-6629-1](https://ubuntu.com/security/notices/USN-6629-1)
