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.
CVSS Details
- CVSS 3.1 Base Score: 5.9
- CVSS 3.1 Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alma_linux | — | Upgrade yajl-develUpgrade yajl | Nov 14, 2022 | Apr 5, 2022 |
| Amazon Linux Ami 2 | — | Upgrade yajl-debuginfoUpgrade yajl-develUpgrade yajl | Jul 4, 2023 | Apr 5, 2022 |
| Amazon_linux_2023 | — | Upgrade yajlUpgrade yajl-develUpgrade yajl-debugsourceUpgrade yajl-debuginfo | Feb 17, 2025 | Apr 5, 2022 |
| Centos_linux | — | Upgrade yajl-debugsourceUpgrade yajl-debuginfoUpgrade yajl | Nov 9, 2022 | Apr 5, 2022 |
| Debian | — | Upgrade r-cran-jsonliteUpgrade yajlUpgrade ruby-yajlUpgrade burp | Jul 17, 2023 | Apr 5, 2022 |
| Huawei Euleros 2_0_sp10 | — | Upgrade yajl | Dec 22, 2022 | Apr 5, 2022 |
| Huawei Euleros 2_0_sp3 | — | Upgrade yajl | May 25, 2022 | Apr 5, 2022 |
| Huawei Euleros 2_0_sp5 | — | Upgrade yajl | Jun 17, 2022 | Apr 5, 2022 |
| Huawei Euleros 2_0_sp8 | — | Upgrade yajlUpgrade yajl-devel | Dec 9, 2022 | Apr 5, 2022 |
| Huawei Euleros 2_0_sp9 | — | Upgrade yajl | Nov 15, 2022 | Apr 5, 2022 |
| Oracle_linux | — | Upgrade yajl-develUpgrade yajl | Nov 16, 2022 | Apr 5, 2022 |
| Redhat_linux | — | Upgrade yajl-develUpgrade yajlNo solution existsUpgrade yajl-debuginfoUpgrade yajl-debugsource | Nov 9, 2022 | Apr 5, 2022 |
| Rocky_linux | — | Upgrade yajl-develUpgrade yajl-debugsourceUpgrade yajl-debuginfoUpgrade yajl | Mar 12, 2024 | Apr 5, 2022 |
| Suse | — | Upgrade libyajl-develUpgrade libyajl2-32bitUpgrade yajlUpgrade libyajl-devel-staticUpgrade libyajl-devel-32bitUpgrade libyajl2 | Oct 26, 2022 | Apr 5, 2022 |
| Ubuntu | — | Upgrade libyajl2Upgrade libyajl2 (Ubuntu Pro) | Jul 19, 2023 | Apr 5, 2022 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jan 20, 2025 | Apr 5, 2022 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub