{"id":"CVE-2021-45958","aliases":["CVE-2021-45958","GHSA-fh56-85cw-5pq6","PYSEC-2022-25"],"related":[],"kind":"vulnerability","state":"published","title":"UltraJSON vulnerable to Out-of-bounds Write","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"UltraJSON (aka ujson) 1.34 through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from encode).","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-12-31T23:52:45.000Z","modified":"2026-06-17T04:14:19.740Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.34","status":"affected","fixed":"5.2.0"}],"ecosystem":"PyPI","package":"ujson","purl":"pkg:pypi/ujson","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.2.0"}],"vendor":"ultrajson_project","product":"ultrajson","cpe":"cpe:2.3:a:ultrajson_project:ultrajson:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"9.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"35"},{"status":"affected","version":"36"},{"status":"affected","version":"37"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"4.0.2","status":"affected","fixed":"5.1.0"}],"ecosystem":"PyPI","package":"ujson","purl":"pkg:pypi/ujson","source":"pysec"}],"references":[{"url":"https://github.com/google/oss-fuzz-vulns/blob/main/vulns/ujson/OSV-2021-955.yaml","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36009","tags":["exploit","issue-tracking","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/ultrajson/ultrajson/issues/502#issuecomment-1031747284","tags":["issue-tracking","patch","report","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/ultrajson/ultrajson/issues/501","tags":["exploit","issue-tracking","report","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/ultrajson/ultrajson/pull/504","tags":["patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/02/msg00023.html","tags":["mailing-list","third-party-advisory","web","x-refsource-mlist","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CN7W3GOXALINKFUUE7ICQIC2EF5HNKUQ/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ULX35TSWLBBIMEH44MUORPXYYRZKEDC6/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O6JUWQTJLA2CMG4CJN7DCUVSOXLZIIXL/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45958","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ultrajson/ultrajson/pull/519","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-fh56-85cw-5pq6","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/ujson/PYSEC-2022-25.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ultrajson/ultrajson","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CN7W3GOXALINKFUUE7ICQIC2EF5HNKUQ","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O6JUWQTJLA2CMG4CJN7DCUVSOXLZIIXL","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULX35TSWLBBIMEH44MUORPXYYRZKEDC6","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-45958","url":"https://www.cve.org/CVERecord?id=CVE-2021-45958","licence":"CVE Terms of Use","modified":"2024-08-04T04:54:31.071Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fh56-85cw-5pq6","url":"https://github.com/advisories/GHSA-fh56-85cw-5pq6","licence":"CC-BY-4.0","modified":"2024-11-18T23:02:13.081Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-45958","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45958","licence":"Public domain","modified":"2026-06-17T04:14:19.740Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-25","url":"https://osv.dev/vulnerability/PYSEC-2022-25","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:24.600Z"}],"updatedAt":"2026-11-25T22:58:06.317Z","epss":{"score":0.01667,"percentile":0.77185,"date":"2026-11-30T12:00:22.000Z"}}