7.5

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

Modified
AliasesSUSE-SU-2022:1746-1SUSE-SU-2022:1918-1SUSE-SU-2022:3162-1
Published 05-04-2022Last modified 22-04-2025

Vulnerability summary

CVE-2022-24795 is a high (CVSS 7.5) Heap-based Buffer Overflow vulnerability in brianmario yajl-ruby. EPSS estimates a 3.44% chance of exploitation in the next 30 days, higher than 89.3% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
3.44%
0%100%
Low · -0.03 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 6 · Related 3

Timeline

  1. 05-04-2022
    PublishedVulnerability first disclosed.
  2. 22-04-2025
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 6 sources · 2 versions

EPSS trend

Probability

3.44%

Chance of exploitation in the next 30 days

Percentile

89%

Versus all other CVEs

30-day change

Decrease -0.03 pp

From 3.47% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Yajl Ruby

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Ubuntu11 products
  • argyllAll versions (No fix recorded)
  • burpAll versions (No fix recorded) | < 2.0.54-4ubuntu0.1~esm1 | < 2.2.18-2ubuntu0.1~esm1 | < 2.4.0-3ubuntu1+esm1
  • collada2gltfAll versions (No fix recorded)
  • icinga2All versions (No fix recorded)
  • libbsonAll versions (No fix recorded)
Suse9 products
  • libyajl&distro=SUSE Linux Enterprise Micro 5.1< 2.1.0-150000.4.3.1
  • libyajl&distro=SUSE Linux Enterprise Micro 5.2< 2.1.0-150000.4.3.1
  • libyajl&distro=SUSE Linux Enterprise Module for Basesystem 15 SP3< 2.1.0-150000.4.3.1
  • libyajl&distro=SUSE Linux Enterprise Module for Basesystem 15 SP4< 2.1.0-150000.4.3.1
  • libyajl&distro=SUSE Linux Enterprise Server 12 SP5< 2.0.1-18.7.1
Debian4 products
  • burpAll versions (No fix recorded) | < 3.1.4-2
  • r-cran-jsonliteAll versions (No fix recorded) | < 1.8.8+dfsg-1
  • ruby-yajl< 1.4.3-1
  • yajl< 2.1.0-3+deb12u2 | < 2.1.0-4
Redhat4 products
  • yajl< 0:2.1.0-11.el8 | < 0:2.1.0-21.el9
  • yajl-debuginfo< 0:2.1.0-11.el8 | < 0:2.1.0-21.el9
  • yajl-debugsource< 0:2.1.0-11.el8 | < 0:2.1.0-21.el9
  • yajl-devel< 0:2.1.0-11.el8 | < 0:2.1.0-21.el9
Opensuse3 products
  • libyajl&distro=openSUSE Leap 15.3< 2.1.0-150000.4.3.1
  • libyajl&distro=openSUSE Leap 15.4< 2.1.0-150000.4.3.1
  • libyajl&distro=openSUSE Leap Micro 5.2< 2.1.0-150000.4.3.1
Brianmario1 product
RubyGems1 product
  • yajl-ruby< 1.4.3
Yajl-ruby_project1 product

8 vendors · 34 products

References

34 links
Show all 34 references