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.
Public exploit: 3 sourcesFix5 products2 fixed builds listed below
e.g. OID 1.3.6.1.4.1.25623.1.0.147932
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.
- 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.
- OpenVAS check added
- Public exploit / PoCsource: github-poc
- Patch availablerecord updated
- Publishedweakness classified, att&ck mapped
Affected products
And 4 more affected products. See all after sign-in
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS: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.
- Initial AccessT1190Exploit Public-Facing Applicationmedium confidence
- Privilege EscalationT1068Exploitation for Privilege Escalationhigh confidence
Sources
References in the record
- github.com/brianmario/yajl-ruby/blob/7168bd79b888900aa94523301126f968a93eb3a6/ext/yajl/yajl_buf.c
- github.com/brianmario/yajl-ruby/commit/7168bd79b888900aa94523301126f968a93eb3a6
- github.com/brianmario/yajl-ruby/security/advisories/GHSA-jj47-x69x-mxrm
And 22 more references. See all after sign-in
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.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI