NVD Vulnerability Detail
Search Exploit, PoC
CVE-2022-24795
Summary

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.

Publication Date April 6, 2022, 1:15 a.m.
Registration Date April 6, 2022, 10 a.m.
Last Update Nov. 21, 2024, 3:51 p.m.
CVSS3.1 : HIGH
スコア 7.5
Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR) 不要
利用者の関与(UI) 不要
影響の想定範囲(S) 変更なし
機密性への影響(C) なし
完全性への影響(I) なし
可用性への影響(A)
CVSS2.0 : MEDIUM
Score 5.0
Vector AV:N/AC:L/Au:N/C:P/I:N/A:N
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃前の認証要否(Au) 不要
機密性への影響(C)
完全性への影響(I) なし
可用性への影響(A) なし
Get all privileges. いいえ
Get user privileges いいえ
Get other privileges いいえ
User operation required いいえ
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:yajl-ruby_project:yajl-ruby:*:*:*:*:*:ruby:*:* 1.4.2
Related information, measures and tools
Common Vulnerabilities List

JVN Vulnerability Information
yajl-ruby project の Ruby 用 yajl-ruby におけるヒープベースのバッファオーバーフローの脆弱性
Title yajl-ruby project の Ruby 用 yajl-ruby におけるヒープベースのバッファオーバーフローの脆弱性
Summary

yajl-ruby project の Ruby 用 yajl-ruby には、ヒープベースのバッファオーバーフローの脆弱性、整数オーバーフローの脆弱性が存在します。

Possible impacts サービス運用妨害 (DoS) 状態にされる可能性があります。
Solution

ベンダアドバイザリまたはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

Publication Date April 5, 2022, midnight
Registration Date July 24, 2023, 5:22 p.m.
Last Update July 24, 2023, 5:22 p.m.
Affected System
yajl-ruby project
yajl-ruby 1.4.2 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2023年07月24日]
  掲載
July 24, 2023, 5:22 p.m.