{"id":"CVE-2021-45958","aliases":["ALPINE-CVE-2021-45958","DEBIAN-CVE-2021-45958","DLA-2929-1","EUVD-2022-0348","GHSA-fh56-85cw-5pq6","MGASA-2022-0169","OESA-2026-3606","OESA-2026-3607","OESA-2026-3608","OESA-2026-3720","PYSEC-2022-25","SUSE-SU-2023:2134-1","UBUNTU-CVE-2021-45958","USN-6629-1","USN-6629-2","openSUSE-SU-2024:12106-1","openSUSE-SU-2025:15107-1"],"status":"published","title":"UltraJSON vulnerable to Out-of-bounds Write","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.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.01667,"percentile":0.76941,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-787"],"published":"2021-12-31T23:52:45Z","modified":"2026-11-03T06:32:41Z","fixes":[{"ecosystem":"PyPI","package":"ujson","fixed_in":["5.2.0","5.1.0"],"sources":["ghsa","osv"]},{"ecosystem":"Alpine:v3.16","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.17","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"py3-ujson","fixed_in":["5.2.0-r0"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"ujson","fixed_in":["5.2.0-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"ujson","fixed_in":["5.2.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"ujson","fixed_in":["5.2.0-1"],"sources":["osv"]},{"ecosystem":"Debian:9","package":"ujson","fixed_in":["1.35-1+deb9u1"],"sources":["osv"]},{"ecosystem":"Mageia:8","package":"python-ujson","fixed_in":["5.2.0-1.mga8"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP4","package":"python-ujson","fixed_in":["1.35-150100.3.8.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP4","package":"python-ujson","fixed_in":["1.35-150100.3.8.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","package":"python-ujson","fixed_in":["1.35-150100.3.8.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Leap 15.4","package":"python-ujson","fixed_in":["1.35-150100.3.8.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ujson","fixed_in":["1.33-1ubuntu0.1~esm2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ujson","fixed_in":["1.35-2ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:20.04:LTS","package":"ujson","fixed_in":["1.35-4ubuntu0.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"ujson","fixed_in":["5.1.0-1ubuntu0.1~esm1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.34"},{"fixed":"5.2.0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.16","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"py3-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-r0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-1"}]}]},{"source":"osv","ecosystem":"Debian:9","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-1+deb9u1"}]}],"versions":["1.35-1"]},{"source":"osv","ecosystem":"PyPI","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.34"},{"fixed":"5.2.0"}]}],"versions":["1.34","1.35","2.0.0","2.0.1","2.0.2","2.0.3","3.0.0","3.1.0","3.2.0","4.0.0","4.0.1","4.0.2","4.1.0","4.2.0","4.3.0","5.0.0","5.1.0"]},{"source":"osv","ecosystem":"Mageia:8","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.0-1.mga8"}]}]},{"source":"osv","ecosystem":"openEuler:20.03-LTS-SP4","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.0.2-3.oe2003sp4"}]}],"bundled":5},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP1","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.0-6.oe2403sp1"}]}],"bundled":4},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP3","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.0-7.oe2403sp3"}]}],"bundled":4},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP4","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.0-6.oe2403sp4"}]}],"bundled":4},{"source":"osv","ecosystem":"PyPI","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.2"},{"fixed":"5.1.0"}]}],"versions":["4.0.2","4.1.0","4.2.0","4.3.0","5.0.0"]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP4","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-150100.3.8.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP4","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-150100.3.8.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-150100.3.8.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Leap 15.4","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-150100.3.8.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:14.04:LTS","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.12.0-2ubuntu1","0.13.1-2ubuntu1","0.13.1-2ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.33-1ubuntu0.1~esm2"}]}],"versions":["1.33-1","1.33-1build1"]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.15.0-2","0.15.0-2ubuntu1","0.15.0-2ubuntu2","0.17.1-3ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.19.2-5.1ubuntu4","0.22.0-2ubuntu1","0.22.0-3","0.22.0-4","0.22.0-4ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-2ubuntu0.1~esm1"}]}],"versions":["1.35-1build2","1.35-2"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-4ubuntu0.1"}]}],"versions":["1.35-3build1","1.35-3build2","1.35-4","1.35-4build1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.23.3+dfsg-4ubuntu1","0.23.3+dfsg-4ubuntu5","0.23.3+dfsg-4ubuntu6","0.25.3+dfsg-4","0.25.3+dfsg-4build1","0.25.3+dfsg-7"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.1.5+dfsg-2","1.1.5+dfsg-2ubuntu1","1.3.5+dfsg-2","1.3.5+dfsg-2ubuntu1","1.3.5+dfsg-3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.0-1ubuntu0.1~esm1"}]}],"versions":["4.0.2-1","4.0.2-1build1","4.2.0-1","5.1.0-1","5.1.0-1build1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.3+dfsg-6","1.5.3+dfsg-6ubuntu1","1.5.3+dfsg-7ubuntu1","1.5.3+dfsg-10","2.1.4+dfsg-4ubuntu2","2.1.4+dfsg-7"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.3+dfsg-8build1","2.2.3+dfsg-9"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.3.3+dfsg-3ubuntu1","2.3.3+dfsg-3ubuntu3"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"pandas","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.3+dfsg-9","2.3.3+dfsg-1ubuntu1","2.3.3+dfsg-3","2.3.3+dfsg-3ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.33-1ubuntu0.1~esm2"}]}],"versions":["1.33-1","1.33-1build1"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-2ubuntu0.1~esm1"}]}],"versions":["1.35-1build2","1.35-2"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.0-1ubuntu0.1~esm1"}]}],"versions":["4.0.2-1","4.0.2-1build1","4.2.0-1","5.1.0-1","5.1.0-1build1"],"bundled":3},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.35-4ubuntu0.1"}]}],"versions":["1.35-3build1","1.35-3build2","1.35-4","1.35-4build1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-ujson","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.10.0-1.5"}]}],"bundled":3}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"fedoraproject","product":"fedora"},{"vendor":"ultrajson_project","product":"ultrajson"}],"references":[{"url":"https://github.com/google/oss-fuzz-vulns/blob/main/vulns/ujson/OSV-2021-955.yaml","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","evidence","web","report"]},{"url":"https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36009","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://github.com/ultrajson/ultrajson/issues/502#issuecomment-1031747284","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://github.com/ultrajson/ultrajson/issues/501","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://github.com/ultrajson/ultrajson/pull/504","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/02/msg00023.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CN7W3GOXALINKFUUE7ICQIC2EF5HNKUQ/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ULX35TSWLBBIMEH44MUORPXYYRZKEDC6/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O6JUWQTJLA2CMG4CJN7DCUVSOXLZIIXL/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45958","tags":["advisory"]},{"url":"https://github.com/ultrajson/ultrajson/pull/519","tags":["web"]},{"url":"https://github.com/advisories/GHSA-fh56-85cw-5pq6","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/ujson/PYSEC-2022-25.yaml","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CN7W3GOXALINKFUUE7ICQIC2EF5HNKUQ","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O6JUWQTJLA2CMG4CJN7DCUVSOXLZIIXL","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULX35TSWLBBIMEH44MUORPXYYRZKEDC6","tags":["web"]},{"url":"https://security.alpinelinux.org/vuln/CVE-2021-45958","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-45958","tags":["advisory"]},{"url":"https://github.com/ultrajson/ultrajson","tags":["package"]},{"url":"https://advisories.mageia.org/MGASA-2022-0169.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=30106","tags":["report"]},{"url":"https://www.debian.org/lts/security/2022/dla-2929","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/2DGMNYDS6YXY3YKK2GES4V5ZN5S4HX74/","tags":["web"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-3606","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31116","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31117","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44660","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54911","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-3607","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32875","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-3608","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-3720","tags":["advisory"]},{"url":"https://www.suse.com/support/update/announcement/2023/suse-su-20232134-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1194261","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2021-45958","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-45958","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6629-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/notices/USN-6629-2","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-45958","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-31116","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2022-31117","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/KL3RUIUL44VPVSZZRZRL4FQDR4CDAGSW/","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2022-31116","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2022-31117","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-45958","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.","status":"published","published":"2021-12-31T23:52:45Z","modified":"2024-08-04T04:54:31.071Z","updated_at":"2026-11-02T14:33:02.580561Z"}],"euvd":[{"id":"EUVD-2022-0348","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.","status":"published","published":"2021-12-31T23:52:45Z","modified":"2024-08-04T04:54:31Z","updated_at":"2026-11-03T03:08:24.682864Z"}],"ghsa":[{"id":"GHSA-fh56-85cw-5pq6","title":"UltraJSON vulnerable to Out-of-bounds Write","description":"UltraJSON (aka ujson) 1.34 through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from encode).","status":"published","published":"2022-01-21T23:27:45Z","modified":"2024-11-18T22:47:32Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"},{"version":"4.0","score":6.8,"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","level":"medium"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:38:20.833758Z"}],"nvd":[{"id":"CVE-2021-45958","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.","status":"published","published":"2022-01-01T00:15:08.813Z","modified":"2026-06-17T04:14:19.74Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:07:02.977492Z"}],"osv":[{"id":"ALPINE-CVE-2021-45958","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.","status":"published","published":"2022-01-01T00:15:08.813Z","modified":"2026-11-03T06:32:41.913630452Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-03T07:17:02.90744Z"},{"id":"CVE-2021-45958","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.","status":"published","published":"2022-01-01T00:15:08.813Z","modified":"2026-10-20T10:54:12.656501752Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:44:22.18434Z"},{"id":"DEBIAN-CVE-2021-45958","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.","status":"published","published":"2022-01-01T00:15:08.813Z","modified":"2026-10-23T18:04:17.88156514Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:45:35.799676Z"},{"id":"GHSA-fh56-85cw-5pq6","title":"UltraJSON vulnerable to Out-of-bounds Write","description":"UltraJSON (aka ujson) 1.34 through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from encode).","status":"published","published":"2022-01-21T23:27:45Z","modified":"2024-11-18T23:02:13.081685Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"},{"version":"4.0","score":6.8,"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","level":"medium"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T15:46:46.39441Z"},{"id":"OESA-2026-3606","title":"python-ujson security update","description":"UltraJSON\r\n\r\nSecurity Fix(es):\n\nUltraJSON (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.(CVE-2021-45958)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Affected versions were found to improperly decode certain characters. JSON strings that contain escaped surrogate characters not part of a proper surrogate pair were decoded incorrectly. Besides corrupting strings, this allowed for potential key confusion and value overwriting in dictionaries. All users parsing JSON from untrusted sources are vulnerable. From version 5.4.0, UltraJSON decodes lone surrogates in the same way as the standard library\u0026apos;s `json` module does, preserving them in the parsed output. Users are advised to upgrade. There are no known workarounds for this issue.(CVE-2022-31116)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. In versions prior to 5.4.0 an error occurring while reallocating a buffer for string decoding can cause the buffer to get freed twice. Due to how UltraJSON uses the internal decoder, this double free is impossible to trigger from Python. This issue has been resolved in version 5.4.0 and all users should upgrade to UltraJSON 5.4.0. There are no known workarounds for this issue.(CVE-2022-31117)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.12.1, when ujson.dump() writes to a file-like object and the write operation raises an exception, the serialized JSON string object is not decremented, leaking memory. Each failed write operation leaks the full size of the serialized payload. This vulnerability is fixed in 5.12.1.(CVE-2026-44660)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.13.0, ujson.dumps() (or ujson.dump() or ujson.encode()) have a reject_bytes=False option. When set, they may accept malformed or truncated UTF-8 byte sequences, silently rewriting them into different Unicode characters instead of rejecting them. This leads to input validation bypass and data integrity issues. This vulnerability is fixed in 5.13.0.(CVE-2026-54911)","status":"published","published":"2026-09-05T15:03:05Z","modified":"2026-09-05T15:16:25.986617277Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:47.217107Z"},{"id":"OESA-2026-3607","title":"python-ujson security update","description":"UltraJSON\r\n\r\nSecurity Fix(es):\n\nUltraJSON (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.(CVE-2021-45958)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Versions 5.10 through 5.11.0 are vulnerable to buffer overflow or infinite loop through large indent handling. ujson.dumps() crashes the Python interpreter (segmentation fault) when the product of the indent parameter and the nested depth of the input exceeds INT32_MAX. It can also get stuck in an infinite loop if the indent is a large negative number. Both are caused by an integer overflow/underflow whilst calculating how much memory to reserve for indentation. And both can be used to achieve denial of service. To be vulnerable, a service must call ujson.dump()/ujson.dumps()/ujson.encode() whilst giving untrusted users control over the indent parameter and not restrict that indentation to reasonably small non-negative values. A service may also be vulnerable to the infinite loop if it uses a fixed negative indent. An underflow always occurs for any negative indent when the input data is at least one level nested but, for small negative indents, the underflow is usually accidentally rectified by another overflow. This issue has been fixed in version 5.12.0.(CVE-2026-32875)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.12.1, when ujson.dump() writes to a file-like object and the write operation raises an exception, the serialized JSON string object is not decremented, leaking memory. Each failed write operation leaks the full size of the serialized payload. This vulnerability is fixed in 5.12.1.(CVE-2026-44660)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.13.0, ujson.dumps() (or ujson.dump() or ujson.encode()) have a reject_bytes=False option. When set, they may accept malformed or truncated UTF-8 byte sequences, silently rewriting them into different Unicode characters instead of rejecting them. This leads to input validation bypass and data integrity issues. This vulnerability is fixed in 5.13.0.(CVE-2026-54911)","status":"published","published":"2026-09-05T15:03:06Z","modified":"2026-09-05T15:16:25.284263547Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:47.217107Z"},{"id":"OESA-2026-3608","title":"python-ujson security update","description":"UltraJSON\r\n\r\nSecurity Fix(es):\n\nUltraJSON (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.(CVE-2021-45958)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Versions 5.10 through 5.11.0 are vulnerable to buffer overflow or infinite loop through large indent handling. ujson.dumps() crashes the Python interpreter (segmentation fault) when the product of the indent parameter and the nested depth of the input exceeds INT32_MAX. It can also get stuck in an infinite loop if the indent is a large negative number. Both are caused by an integer overflow/underflow whilst calculating how much memory to reserve for indentation. And both can be used to achieve denial of service. To be vulnerable, a service must call ujson.dump()/ujson.dumps()/ujson.encode() whilst giving untrusted users control over the indent parameter and not restrict that indentation to reasonably small non-negative values. A service may also be vulnerable to the infinite loop if it uses a fixed negative indent. An underflow always occurs for any negative indent when the input data is at least one level nested but, for small negative indents, the underflow is usually accidentally rectified by another overflow. This issue has been fixed in version 5.12.0.(CVE-2026-32875)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.12.1, when ujson.dump() writes to a file-like object and the write operation raises an exception, the serialized JSON string object is not decremented, leaking memory. Each failed write operation leaks the full size of the serialized payload. This vulnerability is fixed in 5.12.1.(CVE-2026-44660)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.13.0, ujson.dumps() (or ujson.dump() or ujson.encode()) have a reject_bytes=False option. When set, they may accept malformed or truncated UTF-8 byte sequences, silently rewriting them into different Unicode characters instead of rejecting them. This leads to input validation bypass and data integrity issues. This vulnerability is fixed in 5.13.0.(CVE-2026-54911)","status":"published","published":"2026-09-05T15:03:07Z","modified":"2026-09-05T15:16:22.436261367Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:47.217107Z"},{"id":"OESA-2026-3720","title":"python-ujson security update","description":"UltraJSON\r\n\r\nSecurity Fix(es):\n\nUltraJSON (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.(CVE-2021-45958)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Versions 5.10 through 5.11.0 are vulnerable to buffer overflow or infinite loop through large indent handling. ujson.dumps() crashes the Python interpreter (segmentation fault) when the product of the indent parameter and the nested depth of the input exceeds INT32_MAX. It can also get stuck in an infinite loop if the indent is a large negative number. Both are caused by an integer overflow/underflow whilst calculating how much memory to reserve for indentation. And both can be used to achieve denial of service. To be vulnerable, a service must call ujson.dump()/ujson.dumps()/ujson.encode() whilst giving untrusted users control over the indent parameter and not restrict that indentation to reasonably small non-negative values. A service may also be vulnerable to the infinite loop if it uses a fixed negative indent. An underflow always occurs for any negative indent when the input data is at least one level nested but, for small negative indents, the underflow is usually accidentally rectified by another overflow. This issue has been fixed in version 5.12.0.(CVE-2026-32875)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.12.1, when ujson.dump() writes to a file-like object and the write operation raises an exception, the serialized JSON string object is not decremented, leaking memory. Each failed write operation leaks the full size of the serialized payload. This vulnerability is fixed in 5.12.1.(CVE-2026-44660)\n\nUltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.13.0, ujson.dumps() (or ujson.dump() or ujson.encode()) have a reject_bytes=False option. When set, they may accept malformed or truncated UTF-8 byte sequences, silently rewriting them into different Unicode characters instead of rejecting them. This leads to input validation bypass and data integrity issues. This vulnerability is fixed in 5.13.0.(CVE-2026-54911)","status":"published","published":"2026-09-14T16:33:43Z","modified":"2026-09-13T16:45:31.33071619Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:47.217107Z"},{"id":"UBUNTU-CVE-2021-45958","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.","status":"published","published":"2022-01-01T00:15:00Z","modified":"2026-10-17T12:55:55.575546555Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:54:30.277322Z"},{"id":"DLA-2929-1","title":"ujson - security update","status":"published","published":"2022-02-26T00:00:00Z","modified":"2026-03-09T01:20:59.640873Z","updated_at":"2026-11-02T15:46:11.189256Z"},{"id":"MGASA-2022-0169","title":"Updated python-ujson packages fix security vulnerability","description":"UltraJSON (aka ujson) through 5.1.0 has a stack-based buffer overflow in\nBuffer_AppendIndentUnchecked (called from encode). Exploitation can, for\nexample, use a large amount of indentation. (CVE-2021-45958)\n","status":"published","published":"2022-05-12T10:24:45Z","modified":"2026-04-16T04:42:07.330102856Z","updated_at":"2026-11-02T15:49:41.849028Z"},{"id":"openSUSE-SU-2024:12106-1","title":"python310-ujson-5.3.0-1.1 on GA media","description":"These are all security issues fixed in the python310-ujson-5.3.0-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:47:02.312729Z","updated_at":"2026-11-02T16:58:35.485255Z"},{"id":"openSUSE-SU-2025:15107-1","title":"python311-ujson-5.10.0-1.5 on GA media","description":"These are all security issues fixed in the python311-ujson-5.10.0-1.5 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2025-05-17T00:00:00Z","modified":"2026-02-04T04:11:52.296481Z","updated_at":"2026-11-02T16:58:37.399567Z"},{"id":"PYSEC-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.","status":"published","published":"2022-01-01T00:15:00Z","modified":"2023-11-08T04:07:24.600926Z","updated_at":"2026-11-02T15:52:53.449407Z"},{"id":"SUSE-SU-2023:2134-1","title":"Security update for python-ujson","description":"This update for python-ujson fixes the following issues:\n\n- CVE-2021-45958: Fixed a stack-based buffer overflow in Buffer_AppendIndentUnchecked (bsc#1194261).\n","status":"published","published":"2023-05-09T11:38:03Z","modified":"2025-05-02T04:32:01.506789Z","updated_at":"2026-11-02T15:53:52.350754Z"},{"id":"USN-6629-1","title":"ujson vulnerabilities","description":"It was discovered that UltraJSON incorrectly handled certain input with\na large amount of indentation. An attacker could possibly use this issue\nto crash the program, resulting in a denial of service. (CVE-2021-45958)\n\nJake Miller discovered that UltraJSON incorrectly decoded certain\ncharacters. An attacker could possibly use this issue to cause key\nconfusion and overwrite values in dictionaries. (CVE-2022-31116)\n\nIt was discovered that UltraJSON incorrectly handled an error when\nreallocating a buffer for string decoding. An attacker could possibly\nuse this issue to corrupt memory. (CVE-2022-31117)\n","status":"published","published":"2024-02-14T01:41:18Z","modified":"2026-06-25T13:32:27.266709234Z","updated_at":"2026-11-02T16:58:17.914523Z"},{"id":"USN-6629-2","title":"ujson vulnerability","description":"USN-6629-1 fixed vulnerabilities in UltraJSON.\nThis update provides the corresponding updates for Ubuntu 20.04 LTS.\n\nOriginal advisory details:\n\n It was discovered that UltraJSON incorrectly handled certain input with\n a large amount of indentation. An attacker could possibly use this issue\n to crash the program, resulting in a denial of service. (CVE-2021-45958)\n \n Jake Miller discovered that UltraJSON incorrectly decoded certain\n characters. An attacker could possibly use this issue to cause key\n confusion and overwrite values in dictionaries. (CVE-2022-31116)\n \n It was discovered that UltraJSON incorrectly handled an error when\n reallocating a buffer for string decoding. An attacker could possibly\n use this issue to corrupt memory. (CVE-2022-31117)\n","status":"published","published":"2024-02-14T02:58:36Z","modified":"2026-04-27T17:05:14.979511Z","updated_at":"2026-11-02T16:58:17.914523Z"}]}}
