7.5

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

CVSS: 7.5v3.1HighModified
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.47% chance of exploitation in the next 30 days, higher than 88.9% of scored vulnerabilities. 1 public exploit is recorded.

Overall risk
41/100
0100
Medium · default modelHow is this calculated?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
3.47%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 5 · Related 2

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.47%

Chance of exploitation in the next 30 days

Percentile

89%

Versus all other CVEs

30-day change

0.00 pp

From 3.47% on 19-09-2026

19-09-202619-10-2026
EPSS score
3.47%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

1 found
  • githubUnverified

    Yajl Ruby

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Ubuntu11 products
  • argyllAll versions (No fix recorded)
  • burpAll versions (No fix recorded)
  • 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

32 links
Show all 32 references