CVE-2021-45958: UltraJSON vulnerable to Out-of-bounds Write

CVE-2021-45958 · Severity: low · CVSS 3.1 · Published 2022-01-01

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.

Technologies: ujson (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2021-45958 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-45958 being exploited in the wild.
How severe is CVE-2021-45958?
Low severity, with a CVSS score of 3.1, published 1 January 2022.
Which products and versions are affected?
ujson (PyPI) ECOSYSTEM:introduced=1.34,fixed=5.2.0, ECOSYSTEM:introduced=4.0.2,fixed=5.1.0.
Is there a fix for CVE-2021-45958?
Yes. ujson (PyPI): upgrade to 5.1.0, 5.2.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2021-45958?
Check whether you run ujson (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • ujson (PyPI): upgrade to 5.1.0, 5.2.0 or later
    pip install "ujson>=5.2.0"

Affected products

  • ujson (PyPI) ECOSYSTEM:introduced=1.34,fixed=5.2.0, ECOSYSTEM:introduced=4.0.2,fixed=5.1.0

Identifiers

  • CVE-2021-45958
  • GHSA-fh56-85cw-5pq6
  • PYSEC-2022-25

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.