NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎
💎 RubyGems
Not in CISA KEV
MEDIUM severity

Buffer Overflow in yajl-rubyGHSA-jj47-x69x-mxrm

MEDIUMFix: brianmario/yajl-ruby@7168bd7

GHSA-jj47-x69x-mxrm is a medium-severity (CVSS 5.9) CWE-122 vulnerability in yajl-ruby. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for yajl-ruby — see the affected versions and patch details below.

Also known asCVE-2022-24795
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
2 known
Exploitation data as of Nov 11, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for GHSA-jj47-x69x-mxrm.

EPSS Exploitation Probability

via FIRST.org ↗
3.4%probability of exploitation in next 30 days
Lower Risk-0.03%
Lower risk than most CVEs89th percentile — riskier than 89% of all scored CVEsHighest risk
1.36%2.23%3.10%3.97%1.9%3.4%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
💎yajl-ruby

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

NOTE: A previous patch, 1.4.2, fixed the heap memory issue, but could still lead to a DoS infinite loop. Please update to version 1.4.3

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.

Details

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.

Impact

We rate this as a moderate severity vulnerability which mostly impacts process availability as we believe exploitation for arbitrary code execution to be unlikely.

Patches

Patched in yajl-ruby 1.4.3

Workarounds

Avoid passing large inputs to YAJL

References

https://github.com/brianmario/yajl-ruby/blob/7168bd79b888900aa94523301126f968a93eb3a6/ext/yajl/yajl_buf.c#L64

For more information

If you have any questions or comments about this advisory:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemsyajl-rubyall versions1.4.3bundle update yajl-ruby --conservative

Affected Products

1 product · 1 configurations
Application
yajl-rubyyajl-ruby_project
< 1.4.2
range
Exploits & PoCs
2

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for yajl-ruby, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update yajl-ruby to 1.4.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jj47-x69x-mxrm is resolved across your whole dependency graph.

  3. Workarounds

    Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

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.

Workaround published by Red Hat
Avoid passing large inputs to the YAJL library.
Source: Red Hat security advisory for GHSA-jj47-x69x-mxrm (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Enterprise Linux 8yajl-0:2.1.0-11.el8RHSA-2022:7524
Red Hat Enterprise Linux 8.6 Extended Update Supportyajl-0:2.1.0-13.el8_6RHSA-2024:2063
Red Hat Enterprise Linux 9yajl-0:2.1.0-21.el9RHSA-2022:8252

Frequently Asked Questions

_NOTE: A previous patch, 1.4.2, fixed the heap memory issue, but could still lead to a DoS infinite loop. Please update to version 1.4.3_ The 1.x branch and the 2.x branch of [yajl](https://github.com/lloyd/yajl) contain an integer overflow which leads to subsequent heap memory corruption when dealing with large (~2GB) inputs. ### Details The [reallocation logic at yajl_buf.c#L64](https://github.com/brianmario/yajl-ruby/blob/7168bd79b888900aa94523301126f968a93eb3a6/ext/yajl/yajl_buf.c#L64) may result in the `need` 32bit integer wrapping to 0 when `need` approaches a value of 0x80000000 (i.e
O3 Security · Impact-Aware SCA

Is GHSA-jj47-x69x-mxrm in your dependencies?

Find it across RubyGems, including transitive dependencies.

Buffer Overflow in yajl-ruby (Medium 5.9)