CVE-2021-45958
JSON

5.5medium

UltraJSON vulnerable to Out-of-bounds Write

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
1.67% (higher than 77% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-fh56-85cw-5pq6PYSEC-2022-25

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
ujson (PyPI)from 1.34 before 5.2.0, from 4.0.2 before 5.1.0GitHub Advisory Database, PyPA Advisory Database
ultrajson_project ultrajsonbefore 5.2.0NVD
debian debian_linux9.0NVD
fedoraproject fedora35, 36, 37NVD

All scores

GitHub5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
GitHubmedium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

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.

GitHub Advisory Database

UltraJSON (aka ujson) 1.34 through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from encode).

NVD (es)

UltraJSON (también conocido como ujson) a través de 5.1.0 tiene un desbordamiento de búfer basado en pila en Buffer_AppendIndentUnchecked (llamado desde encode). La explotación puede, por ejemplo, utilizar una gran cantidad de sangría

References

https://github.com/google/oss-fuzz-vulns/blob/main/vulns/ujson/OSV-2021-955.yamlexploit, third-party-advisory, web
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36009exploit, issue-tracking, third-party-advisory, web
https://github.com/ultrajson/ultrajson/issues/502#issuecomment-1031747284issue-tracking, patch, report, third-party-advisory, web
https://github.com/ultrajson/ultrajson/issues/501exploit, issue-tracking, report, third-party-advisory, web
https://github.com/ultrajson/ultrajson/pull/504patch, third-party-advisory, web
https://lists.debian.org/debian-lts-announce/2022/02/msg00023.htmlmailing-list, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CN7W3GOXALINKFUUE7ICQIC2EF5HNKUQ/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ULX35TSWLBBIMEH44MUORPXYYRZKEDC6/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O6JUWQTJLA2CMG4CJN7DCUVSOXLZIIXL/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2/vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-45958advisory
https://github.com/ultrajson/ultrajson/pull/519web

Sources

SourceRecordLicence
CVE ListCVE-2021-45958 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-fh56-85cw-5pq6 changed 2024-11-18CC-BY-4.0
NVDCVE-2021-45958 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2022-25 changed 2023-11-08CC-BY-4.0