CVEfocus › CVE database › CVE-2022-24795

CVE-2022-24795Buffer Overflow and Integer Overflow in yajl-ruby

CVSS 5.9 MediumEPSS 3.4% (higher than 90% of CVEs)Published 2022-04-05Updated 2025-04-22Assigner: GitHub_M

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.

CWE-122CWE-190

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

22Fixed
12Fix pending
24Under investigation
43Will not fix
3Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10argyllFix pendingUBUNTU-CVE-2022-24795
Ubuntu 26.10icinga2Fix pendingUBUNTU-CVE-2022-24795
Ubuntu 26.10lnavFix pendingUBUNTU-CVE-2022-24795
Ubuntu 26.10php-mongodbFix pendingUBUNTU-CVE-2022-24795
Ubuntu 26.10r-cran-jsonliteFix pendingUBUNTU-CVE-2022-24795
Ubuntu 26.10ruby-yajlFix pendingUBUNTU-CVE-2022-24795
Ubuntu 26.10tulipFix pendingUBUNTU-CVE-2022-24795
Ubuntu 26.04argyllUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04burpUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04icinga2Under investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04lnavUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04php-mongodbUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04r-cran-jsonliteUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04ruby-yajlUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04tulipUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 26.04yajlNot affected
vulnerable_code_not_present
Ubuntu 25.10argyllWill 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.10burpWill 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.10icinga2Will 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.10lnavWill 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.10php-mongodbWill 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.10r-cran-jsonliteWill 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.10ruby-yajlWill 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.10tulipWill 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.10yajlNot affected
vulnerable_code_not_present
Ubuntu 24.04argyllUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 24.04burpUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 24.04icinga2Under investigationUBUNTU-CVE-2022-24795
Ubuntu 24.04lnavUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 24.04php-mongodbUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 24.04r-cran-jsonliteUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 24.04ruby-yajlUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 24.04yajlNot affected
vulnerable_code_not_present
Ubuntu 22.04argyllUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04burpUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04collada2gltfUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04icinga2Under investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04lnavUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04php-mongodbUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04r-cran-jsonliteUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04ruby-yajlUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04tulipUnder investigationUBUNTU-CVE-2022-24795
Ubuntu 22.04yajlFixed2.1.0-3ubuntu0.22.04.1UBUNTU-CVE-2022-24795
Ubuntu 20.04argyllWill 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.04burpWill 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.04icinga2Will 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.04lnavWill 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.04php-mongodbWill 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.04r-cran-jsonliteWill 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.04ruby-yajlWill 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.04yajlFixed2.1.0-3ubuntu0.20.04.1UBUNTU-CVE-2022-24795
Ubuntu 18.04argyllWill 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.04burpWill 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.04collada2gltfWill 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.04icinga2Will 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.04libbsonFix pendingUBUNTU-CVE-2022-24795
Ubuntu 18.04lnavWill 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.04php-mongodbWill 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.04r-cran-jsonliteWill 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.04ruby-yajlWill 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.04yajlFix pending2.1.0-2ubuntu0.18.04.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2022-24795
Ubuntu 16.04argyllWill 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.04burpWill 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.04collada2gltfWill 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.04icinga2Will 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.04libbsonWill 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.04lnavWill 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.04php-mongodbWill 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.04r-cran-jsonliteWill 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.04ruby-yajlWill 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.04tulipWill 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.04yajlWill 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.04argyllWill 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.04burpWill 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.04lnavWill 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.04ruby-yajlWill 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.04tulipWill 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.04yajlFix pending2.0.4-4ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2022-24795
Debian 14r-cran-jsonliteFixed1.8.8+dfsg-1DEBIAN-CVE-2022-24795
Debian 14ruby-yajlFixed1.4.3-1DEBIAN-CVE-2022-24795
Debian 14yajlFixed2.1.0-4DEBIAN-CVE-2022-24795
Debian 13burpFixed3.1.4-2DEBIAN-CVE-2022-24795
Debian 13r-cran-jsonliteFixed1.8.8+dfsg-1DEBIAN-CVE-2022-24795
Debian 13ruby-yajlFixed1.4.3-1DEBIAN-CVE-2022-24795
Debian 13yajlFixed2.1.0-4DEBIAN-CVE-2022-24795
Debian 12burpFix pendingDEBIAN-CVE-2022-24795
Debian 12r-cran-jsonliteFix pendingDEBIAN-CVE-2022-24795
Debian 12ruby-yajlFixed1.4.3-1DEBIAN-CVE-2022-24795
Debian 12yajlFixed2.1.0-3+deb12u2DEBIAN-CVE-2022-24795
Red Hat Enterprise Linux 9yajlFixed
Affected
0:2.1.0-21.el9RHSA-2022:8252
Red Hat Enterprise Linux 9yajl-develFixed
Affected
0:2.1.0-21.el9RHSA-2022:8252
Red Hat Enterprise Linux 8yajlFixed
Will not fix
0:2.1.0-11.el8RHSA-2022:7524
Red Hat Enterprise Linux 8yajl-develFixed
Will not fix
0:2.1.0-11.el8RHSA-2022:7524
Red Hat Enterprise Linux 7yajlWill not fix
Out of support scope
Red Hat Enterprise Linux 7yajl-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6yajlWill not fix
Out of support scope
Red Hat Enterprise Linux 6yajl-develWill not fix
Out of support scope
AlmaLinux 9yajlFixed2.1.0-21.el9ALSA-2022:8252
AlmaLinux 9yajl-develFixed2.1.0-21.el9ALSA-2022:8252
AlmaLinux 8yajlFixed2.1.0-11.el8ALSA-2022:7524
AlmaLinux 8yajl-develFixed2.1.0-11.el8ALSA-2022:7524
Rocky Linux 9yajlFixed0:2.1.0-21.el9RLSA-2022:8252
Rocky Linux 8yajlFixed0:2.1.0-11.el8RLSA-2022:7524
RubyGems libraryyajl-rubyFixed1.4.3GHSA-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.

Vendor advisories:

References

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.