CVE-2021-45958 UltraJSON vulnerable to Out-of-bounds Write
A stack-based buffer overflow in UltraJSON allows attackers to execute arbitrary code or cause denial of service via crafted indentation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-45958?
CVE-2021-45958 is a medium-severity memory corruption vulnerability in Debian Debian Linux, published on 31 Dec 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-787
Which versions are affected by CVE-2021-45958?
3 open source packages ship an affected version, including ujson. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
ujson PyPI | From 1.34 | 5.2.0 |
ujson PyPI | From 1.34 | 5.2.0 |
ujson PyPI | From 4.0.2 | 5.1.0 |
Linux distribution packages (4)
python-ujson SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 1.35-150100.3.8.1 |
python-ujson SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.35-150100.3.8.1 |
python-ujson SUSE:Linux Enterprise Real Time 15 SP3 | All versions | 1.35-150100.3.8.1 |
python-ujson openSUSE:Leap 15.4 | All versions | 1.35-150100.3.8.1 |
Products include Debian Debian Linux, Fedoraproject Fedora, Ultrajson Project Ultrajson.
How do I fix CVE-2021-45958?
Upgrade ujson to a fixed version for your release line: 5.2.0 or 5.1.0.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2021-45958 being exploited?
There is no known exploitation of CVE-2021-45958 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as DEBIAN-CVE-2021-45958, DLA-2929-1, GHSA-fh56-85cw-5pq6, MGASA-2022-0169, PYSEC-2022-25, SUSE-SU-2023:2134-1 and 3 more.