Skip to main content
Public proof of conceptFix available

CVE-2022-24795

A public proof of concept exists; no exploitation attested.

  • Published2022-04-05
  • Fixed in1.4.3
  • WeaknessCWE-122 · CWE-190

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-04-0516:15CVE publishedNVD

Versions per branch

OSV · NVD
yajl-ruby
BranchAffectedFixed in
1.4< 1.4.31.4.3
Yajl-ruby project yajl-ruby
BranchAffectedFixed in
1.4< 1.4.21.4.2

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • brianmario yajl-ruby
    Affected
    • = <= 1.4.1no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2023-08-05

Distribution builds and vendor advisories

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

  • burpUbuntu:Pro:22.04:LTSall versions · fixed in 2.4.0-3ubuntu1+esm1
  • burpUbuntu:Pro:20.04:LTSall versions · fixed in 2.2.18-2ubuntu0.1~esm1
  • burpUbuntu:Pro:18.04:LTSall versions · fixed in 2.0.54-4ubuntu0.1~esm1
  • burpUbuntu:25.10all versions · no fixed version listedand 7 other packages
  • burpDebian:13all versions · fixed in 3.1.4-2
  • burpDebian:12all versions · no fixed version listedand 1 other package
  • burpDebian:10all versions · fixed in 2.1.32-2+deb10u1
  • libbsonUbuntu:Pro:18.04:LTSall versions · no fixed version listed

55 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-24795 Red Hat Product Security93 products fixed · 13 known affected

    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 · +10 more

  • RHSA-2024:2063 Red Hat Product Security31 products fixed

    Red Hat Security Advisory: yajl security update

  • RHSA-2022:8252 Red Hat Product Security31 products fixed

    Red Hat Security Advisory: yajl security update

  • RHSA-2022:7524 Red Hat Product Security31 products fixed

    Red Hat Security Advisory: yajl security update

Full record on NVD

Fix

  1. Update yajl-ruby to 1.4.3
  2. Vendor fix Red Hat Product Security RHSA-2024:2063 · 31 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Workaround from the vendor Red Hat Product Security RHSA-2024:2063 · 31 productsAvoid passing large inputs to the YAJL library.
  4. No fix available, says the vendor Red Hat Product Security CVE-2022-24795 · 3 productsAffected
  5. No fix planned, says the vendor Red Hat Product Security CVE-2022-24795 · 7 productsOut of support scope
  6. No fix planned, says the vendor Red Hat Product Security CVE-2022-24795 · 3 productsWill not fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-04-22
  • CNACVSS 3.15.9known since 2026-10-23
  • NVDCVSS 3.17.5read 2026-10-23
  • NVDCVSS 2.05read 2026-10-23
  • CNAweakness (CWE)CWE-122, CWE-190known since 2026-10-23
  • FIRST EPSSEPSS score3.4 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryModerate2022-04-05

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
2022-04-05
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-jj47-x69x-mxrm

Frequently asked questions

What is 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 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.

Is CVE-2022-24795 actively exploited?

A proof-of-concept exploit exists for CVE-2022-24795, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-24795?

CVE-2022-24795 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.

Running yajl-ruby? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record