CVE-2022-24795
CVSS v3
7.5
HIGH
EPSS Score
3.5 %
exploit probability, as of 2026-10-19
CISA KEV
No
known exploited
Exploitation
—
SSVC status
Get an alert for each new CVE published for yajl-ruby.
Affected and fixed versions
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- yajl-rubyRubyGemsall versions · fixed in 1.4.3
- yajlAlmaLinux:9all versions · fixed in 2.1.0-21.el9and 1 other package
- yajlAlmaLinux:8all versions · fixed in 2.1.0-11.el8and 1 other package
Vendor advisories
yajl: heap-based buffer overflow when handling large inputs due to an integer overflow
yajl-devel as a component of Red Hat Enterprise Linux 6 · yajl.src as a component of Red Hat Enterprise Linux 6 · yajl-devel as a component of Red Hat Enterprise Linux 7
Red Hat Security Advisory: yajl security update
Red Hat Security Advisory: yajl security update
Red Hat Security Advisory: yajl security update
Description
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.
Technical details
- Published
- 2022-04-05
Frequently asked questions
What is CVE-2022-24795?
Is CVE-2022-24795 actively exploited?
What is the CVSS score for CVE-2022-24795?
Running yajl-ruby? Hear about its next vulnerability
CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.
Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.