CVE Tools

CVE-2022-24795

Buffer Overflow and Integer Overflow in yajl-ruby

Public exploit available. Not confirmed exploited in the wild yet. Fixed versions are out.

Check it yourself

OpenVAS · 42 checks

e.g. OID 1.3.6.1.4.1.25623.1.0.147932

Run the check

Published Updated Sources: CVE.org, NVD, GitHub, BDU

What to do

Find your product and version, then upgrade to the build on the right.

  • Brianmario Yajl-rubyAffected: <= 1.4.1Upgrade to: not statedStated by: CVE record
  • RubyGems yajl-rubyAffected: < 1.4.3Upgrade to: 1.4.3Stated by: GitHub advisory
  • Yajl-ruby Project Yajl-rubyAffected: < 1.4.2Upgrade to: 1.4.2Stated by: NVD
  • Сообщество свободного программного обеспечения Debian GNU/LinuxAffected: 10Upgrade to: not statedStated by: BDU
  • ООО «РусБИТех-Астра» Astra Linux Special EditionAffected: 1.7Upgrade to: not statedStated by: BDU

Versions as the sources state them. 6 more products have version data. Full version matrix after sign-in

What it is

From the CVE record

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.

In plain language

No plain-language summary for this CVE yet.

Exploitation

Where each signal puts this CVE on the scale from published to confirmed exploited.

EPSS89th
Public exploit
CISA KEV

Not in the catalog. CISA has not confirmed exploitation.

Public exploits

3 sources with a proof of concept or module.

Exploit links, PoCs and Metasploit modules after sign-in
EPSS

3.5% chance of exploitation activity in the next 30 days, which ranks it in the 89th percentile of scored CVEs.

Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.

Lifecycle

The patch came 471 days before any public exploit.

  1. OpenVAS check added
  2. Public exploit / PoCsource: github-poc
  3. Patch availablerecord updated
  4. Publishedweakness classified, att&ck mapped

Affected products

Technical detail

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Scored 5.9 by NVD.

How it is reached

  • Attack Vector NetworkExploitable remotely over the network without any special conditions
  • Attack Complexity HighRequires specific conditions like a race condition or non-default configuration
  • Privileges Required NoneNo authentication required — anyone can exploit this
  • User Interaction NoneNo user interaction needed — fully automated exploitation

Scope

  • Scope UnchangedImpact is limited to the vulnerable component itself

Impact if exploited

  • Confidentiality NoneNo confidentiality impact
  • Integrity NoneNo integrity impact
  • Availability HighTotal denial of service — the component is completely unavailable

Weaknesses

ATT&CK techniques

Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.

Sources

Watch the software you run.

My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.

We'll flag the next CVE, public exploit or patch for Debian GNU/Linux, not every advisory. This one: public exploit.