cbcvebase.
CVE-2022-24795
published 2022-04-05

CVE-2022-24795: 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…

PriorityP344high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
3.47%
87.9th percentile
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.

Affected

21 ranges
VendorProductVersion rangeFixed in
brianmarioyajl-ruby<= 1.4.1
burp_projectburp>= 0 < 3.1.4-23.1.4-2
burp_projectburp>= 0 < 3.1.4-23.1.4-2
debianburp< burp 3.1.4-2 (forky)burp 3.1.4-2 (forky)
debianepics-base< burp 3.1.4-2 (forky)burp 3.1.4-2 (forky)
debianr-cran-jsonlite< burp 3.1.4-2 (forky)burp 3.1.4-2 (forky)
debianruby-yajl< burp 3.1.4-2 (forky)burp 3.1.4-2 (forky)
debianxqilla< burp 3.1.4-2 (forky)burp 3.1.4-2 (forky)
debianyajl< burp 3.1.4-2 (forky)burp 3.1.4-2 (forky)
msrcazl3_rubygem-yajl-ruby_1.4.1-1_on_azure_linux_3.0
msrcazl3_rubygem-yajl-ruby_1.4.3-1_on_azure_linux_3.0
msrcazure_linux_3.0_arm
msrcazure_linux_3.0_x64
msrccbl2_rubygem-yajl-ruby_1.3.1-2_on_cbl_mariner_2.0
msrccbl_mariner_1.0_arm
msrccbl_mariner_1.0_x64
msrccbl_mariner_2.0_arm
msrccbl_mariner_2.0_x64
msrccm1_rubygem-yajl-ruby_1.4.2-1_on_cbl_mariner_1.0
yajl-ruby_projectyajl-ruby< 1.4.21.4.2
yajl-ruby_projectyajl-ruby>= 0 < 1.4.31.4.3

CVSS provenance

nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:N
osv7.5HIGH
vendor_msrc7.5HIGH
vendor_ubuntu7.5HIGH
vendor_debian5.9MEDIUM
vendor_redhat5.9MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.