CVE-2022-24795Buffer Overflow and Integer Overflow in yajl-ruby
yajl-ruby is a C binding to the YAJL JSON parsing and generation library. The 1.x branch and the 2.x branch of `yajl` contain an integer overflow which leads to subsequent heap memory corruption when dealing with large (~2GB) inputs. The reallocation logic at `yajl_buf.c#L64` may result in the `need` 32bit integer wrapping to 0 when `need` approaches a value of 0x80000000 (i.e. ~2GB of data), which results in a reallocation of buf->alloc into a small heap chunk. These integers are declared as `size_t` in the 2.x branch of `yajl`, which practically prevents the issue from triggering on 64bit platforms, however this does not preclude this issue triggering on 32bit builds on which `size_t` is a 32bit integer. Subsequent population of this under-allocated heap chunk is based on the original buffer size, leading to heap memory corruption. This vulnerability mostly impacts process availability. Maintainers believe exploitation for arbitrary code execution is unlikely. A patch is available and anticipated to be part of yajl-ruby version 1.4.2. As a workaround, avoid passing large inputs to YAJL.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, RubyGems, Ubuntu: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | argyll | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.10 | icinga2 | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.10 | lnav | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.10 | php-mongodb | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.10 | r-cran-jsonlite | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.10 | ruby-yajl | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.10 | tulip | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | argyll | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | burp | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | icinga2 | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | lnav | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | php-mongodb | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | r-cran-jsonlite | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | ruby-yajl | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | tulip | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 26.04 | yajl | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | argyll | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | burp | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | icinga2 | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | lnav | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | php-mongodb | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | r-cran-jsonlite | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | ruby-yajl | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | tulip | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 25.10 | yajl | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | argyll | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 24.04 | burp | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 24.04 | icinga2 | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 24.04 | lnav | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 24.04 | php-mongodb | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 24.04 | r-cran-jsonlite | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 24.04 | ruby-yajl | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 24.04 | yajl | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | argyll | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | burp | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | collada2gltf | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | icinga2 | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | lnav | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | php-mongodb | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | r-cran-jsonlite | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | ruby-yajl | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | tulip | Under investigation | UBUNTU-CVE-2022-24795 | |
| Ubuntu 22.04 | yajl | Fixed | 2.1.0-3ubuntu0.22.04.1 | UBUNTU-CVE-2022-24795 |
| Ubuntu 20.04 | argyll | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 20.04 | burp | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 20.04 | icinga2 | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 20.04 | lnav | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 20.04 | php-mongodb | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 20.04 | r-cran-jsonlite | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 20.04 | ruby-yajl | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 20.04 | yajl | Fixed | 2.1.0-3ubuntu0.20.04.1 | UBUNTU-CVE-2022-24795 |
| Ubuntu 18.04 | argyll | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | burp | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | collada2gltf | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | icinga2 | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | libbson | Fix pending | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | lnav | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | php-mongodb | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | r-cran-jsonlite | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | ruby-yajl | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 18.04 | yajl | Fix pending | 2.1.0-2ubuntu0.18.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2022-24795 |
| Ubuntu 16.04 | argyll | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | burp | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | collada2gltf | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | icinga2 | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | libbson | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | lnav | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | php-mongodb | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | r-cran-jsonlite | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | ruby-yajl | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | tulip | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | UBUNTU-CVE-2022-24795 | |
| Ubuntu 16.04 | yajl | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | 2.1.0-2ubuntu0.16.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2022-24795 |
| Ubuntu 14.04 | argyll | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | ||
| Ubuntu 14.04 | burp | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | ||
| Ubuntu 14.04 | lnav | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | ||
| Ubuntu 14.04 | ruby-yajl | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | ||
| Ubuntu 14.04 | tulip | Will not fix CVE is assigned to yajl-ruby. There is an unofficial patch for yajl which will abort() too, though that is likely hardening and isn't part of this CVE. no… | ||
| Ubuntu 14.04 | yajl | Fix pending | 2.0.4-4ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2022-24795 |
| Debian 14 | r-cran-jsonlite | Fixed | 1.8.8+dfsg-1 | DEBIAN-CVE-2022-24795 |
| Debian 14 | ruby-yajl | Fixed | 1.4.3-1 | DEBIAN-CVE-2022-24795 |
| Debian 14 | yajl | Fixed | 2.1.0-4 | DEBIAN-CVE-2022-24795 |
| Debian 13 | burp | Fixed | 3.1.4-2 | DEBIAN-CVE-2022-24795 |
| Debian 13 | r-cran-jsonlite | Fixed | 1.8.8+dfsg-1 | DEBIAN-CVE-2022-24795 |
| Debian 13 | ruby-yajl | Fixed | 1.4.3-1 | DEBIAN-CVE-2022-24795 |
| Debian 13 | yajl | Fixed | 2.1.0-4 | DEBIAN-CVE-2022-24795 |
| Debian 12 | burp | Fix pending | DEBIAN-CVE-2022-24795 | |
| Debian 12 | r-cran-jsonlite | Fix pending | DEBIAN-CVE-2022-24795 | |
| Debian 12 | ruby-yajl | Fixed | 1.4.3-1 | DEBIAN-CVE-2022-24795 |
| Debian 12 | yajl | Fixed | 2.1.0-3+deb12u2 | DEBIAN-CVE-2022-24795 |
| Red Hat Enterprise Linux 9 | yajl | Fixed Affected | 0:2.1.0-21.el9 | RHSA-2022:8252 |
| Red Hat Enterprise Linux 9 | yajl-devel | Fixed Affected | 0:2.1.0-21.el9 | RHSA-2022:8252 |
| Red Hat Enterprise Linux 8 | yajl | Fixed Will not fix | 0:2.1.0-11.el8 | RHSA-2022:7524 |
| Red Hat Enterprise Linux 8 | yajl-devel | Fixed Will not fix | 0:2.1.0-11.el8 | RHSA-2022:7524 |
| Red Hat Enterprise Linux 7 | yajl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | yajl-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | yajl | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | yajl-devel | Will not fix Out of support scope | ||
| AlmaLinux 9 | yajl | Fixed | 2.1.0-21.el9 | ALSA-2022:8252 |
| AlmaLinux 9 | yajl-devel | Fixed | 2.1.0-21.el9 | ALSA-2022:8252 |
| AlmaLinux 8 | yajl | Fixed | 2.1.0-11.el8 | ALSA-2022:7524 |
| AlmaLinux 8 | yajl-devel | Fixed | 2.1.0-11.el8 | ALSA-2022:7524 |
| Rocky Linux 9 | yajl | Fixed | 0:2.1.0-21.el9 | RLSA-2022:8252 |
| Rocky Linux 8 | yajl | Fixed | 0:2.1.0-11.el8 | RLSA-2022:7524 |
| RubyGems library | yajl-ruby | Fixed | 1.4.3 | GHSA-jj47-x69x-mxrm |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- brianmario yajl-ruby: affected: <= 1.4.1
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://github.com/brianmario/yajl-ruby/security/advisories/GHSA-jj47-x69x-mxrm
- https://github.com/brianmario/yajl-ruby/commit/7168bd79b888900aa94523301126f968a93eb3a6
- https://github.com/brianmario/yajl-ruby/blob/7168bd79b888900aa94523301126f968a93eb3a6/ext/yajl/yajl_buf.c#L64
- https://lists.debian.org/debian-lts-announce/2023/07/msg00013.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KLE3C4CECEJ4EUYI56KXI6OWACWXX7WN/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YO32YDJ74DADC7CMJNLSLBVWN5EXGF5J/
- https://lists.debian.org/debian-lts-announce/2023/08/msg00003.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.