cve.bz

CVE-2022-24795 yajl-ruby project yajl-ruby: Heap-based Buffer Overflow

7.5 highExploit referenceEPSS 3.4%Fix available

High (7.5) in yajl-ruby project yajl-ruby. EPSS 3.4% estimated probability of exploitation activity in the next 30 days. Fixed in yajl-ruby 1.4.3.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
3.4% (unchanged from 3.4% a week ago; 3.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-04-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-122 Heap-based Buffer Overflow
CWE-190 Integer Overflow or Wraparound (Year 2038 problem, Y2K38, Y2038, Epochalypse)
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-24795 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-24795?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-24795?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-24795 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
yajl-ruby_project:yajl-rubybefore 1.4.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-jj47-x69x-mxrmRubyGemsyajl-ruby<1.4.31.4.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10burp2.1.32-2+deb10u1DLA-3516-1
Debian10yajl2.1.0-3+deb10u2DLA-3492-1
Debian12burp, r-cran-jsonliteno fix listedDEBIAN-CVE-2022-24795
Debian12yajl2.1.0-3+deb12u2DEBIAN-CVE-2022-24795
Debian12, 13, 14ruby-yajl1.4.3-1DEBIAN-CVE-2022-24795
Debian13burp3.1.4-2DEBIAN-CVE-2022-24795
Debian13, 14r-cran-jsonlite1.8.8+dfsg-1DEBIAN-CVE-2022-24795
Debian13, 14yajl2.1.0-4DEBIAN-CVE-2022-24795
Ubuntu16.04:LTS, 22.04:LTSburp, lnav, tulip and 6 moreno fix listedUBUNTU-CVE-2022-24795
Ubuntu18.04:LTSburp, lnav, argyll and 5 moreno fix listedUBUNTU-CVE-2022-24795
Ubuntu20.04:LTSyajl2.1.0-3ubuntu0.20.04.1UBUNTU-CVE-2022-24795 USN-6233-2
Ubuntu20.04:LTS, 24.04:LTSburp, lnav, argyll and 4 moreno fix listedUBUNTU-CVE-2022-24795
Ubuntu22.04:LTSyajl2.1.0-3ubuntu0.22.04.1UBUNTU-CVE-2022-24795 USN-6233-2
Ubuntu25.10, 26.04:LTSburp, lnav, tulip and 5 moreno fix listedUBUNTU-CVE-2022-24795
Ubuntu26.10lnav, tulip, argyll and 4 moreno fix listedUBUNTU-CVE-2022-24795
UbuntuPro:14.04:LTSyajl2.0.4-4ubuntu0.1~esm1UBUNTU-CVE-2022-24795 USN-6233-1
UbuntuPro:16.04:LTSyajl2.1.0-2ubuntu0.16.04.1~esm1UBUNTU-CVE-2022-24795 USN-6233-1
UbuntuPro:16.04:LTS, Pro:18.04:LTSlibbsonno fix listedUBUNTU-CVE-2022-24795
UbuntuPro:18.04:LTSyajl2.1.0-2ubuntu0.18.04.1~esm1UBUNTU-CVE-2022-24795 USN-6233-1
Red Hatenterprise_linux:8::appstreamyajl, yajl-debuginfo, yajl-debugsource0:2.1.0-11.el8RHSA-2022:7524
Red Hatenterprise_linux:8::crbyajl-devel, yajl-debuginfo, yajl-debugsource0:2.1.0-11.el8RHSA-2022:7524
Red Hatenterprise_linux:9::appstreamyajl, yajl-debuginfo, yajl-debugsource0:2.1.0-21.el9RHSA-2022:8252
Red Hatenterprise_linux:9::crbyajl-devel, yajl-debuginfo, yajl-debugsource0:2.1.0-21.el9RHSA-2022:8252
Red Hatrhel_eus:8.6::appstreamyajl, yajl-debuginfo, yajl-debugsource0:2.1.0-13.el8_6RHSA-2024:2063
Red Hatrhel_eus:8.6::crbyajl-devel, yajl-debuginfo, yajl-debugsource0:2.1.0-13.el8_6RHSA-2024:2063
SUSELinux Enterprise Micro 5.1, Linux Enterprise Micro 5.2, Linux Enterprise Module for Basesystem 15 SP3 and 1 morelibyajl2.1.0-150000.4.3.1SUSE-SU-2022:3162-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5libyajl2.0.1-18.7.1SUSE-SU-2022:1746-1
SUSEOpenStack Cloud Crowbar 8, OpenStack Cloud Crowbar 9rubygem-yajl-ruby1.3.1-4.6.1SUSE-SU-2022:1918-1
openSUSELeap 15.3, Leap 15.4, Leap Micro 5.2libyajl2.1.0-150000.4.3.1SUSE-SU-2022:3162-1
AlmaLinux8yajl, yajl-devel2.1.0-11.el8ALSA-2022:7524
AlmaLinux9yajl, yajl-devel2.1.0-21.el9ALSA-2022:8252
Rocky Linux8yajl0:2.1.0-11.el8RLSA-2022:7524
Rocky Linux9yajl0:2.1.0-21.el9RLSA-2022:8252
Rocky Linux9yajl0:2.1.0-21.el9_0RLSA-2022:8252
Azure Linux2rubygem-yajl-ruby1.3.1-2AZL-10552
Azure Linux3rubygem-yajl-ruby1.4.3-1AZL-35233

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Enterprise Linux only ships YAJL 2.x versions and on 32-bit systems, more than 2GiB of data will be required for triggering this bug. However, on 64-bit systems, more than 9EiB of data will be needed, making this vulnerability very hard to be exploited on these systems.

Red Hat's mitigation

Avoid passing large inputs to the YAJL library.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8yajl-0:2.1.0-11.el8Fixed 2022-11-08RHSA-2022:7524
Red Hat Enterprise Linux 8.6 Extended Update Supportyajl-0:2.1.0-13.el8_6Fixed 2024-04-25RHSA-2024:2063
Red Hat Enterprise Linux 9yajl-0:2.1.0-21.el9Fixed 2022-11-15RHSA-2022:8252
Red Hat Enterprise Linux 6yajlOut of support scope
Red Hat Enterprise Linux 7yajlOut of support scope
Red Hat Enterprise Linux 8libreoffice:flatpak/yajlWill not fix
Red Hat Enterprise Linux 9libreoffice:flatpak/yajlAffected
Red Hat OpenShift Container Platform 3.11rubygem-yajl-rubyOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-24795.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON