CVE-2022-24795
published 2022-04-05CVE-2022-24795: 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…
PriorityP344high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
3.47%
87.9th percentile
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.
Affected
21 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| brianmario | yajl-ruby | <= 1.4.1 | — |
| burp_project | burp | >= 0 < 3.1.4-2 | 3.1.4-2 |
| burp_project | burp | >= 0 < 3.1.4-2 | 3.1.4-2 |
| debian | burp | < burp 3.1.4-2 (forky) | burp 3.1.4-2 (forky) |
| debian | epics-base | < burp 3.1.4-2 (forky) | burp 3.1.4-2 (forky) |
| debian | r-cran-jsonlite | < burp 3.1.4-2 (forky) | burp 3.1.4-2 (forky) |
| debian | ruby-yajl | < burp 3.1.4-2 (forky) | burp 3.1.4-2 (forky) |
| debian | xqilla | < burp 3.1.4-2 (forky) | burp 3.1.4-2 (forky) |
| debian | yajl | < burp 3.1.4-2 (forky) | burp 3.1.4-2 (forky) |
| msrc | azl3_rubygem-yajl-ruby_1.4.1-1_on_azure_linux_3.0 | — | — |
| msrc | azl3_rubygem-yajl-ruby_1.4.3-1_on_azure_linux_3.0 | — | — |
| msrc | azure_linux_3.0_arm | — | — |
| msrc | azure_linux_3.0_x64 | — | — |
| msrc | cbl2_rubygem-yajl-ruby_1.3.1-2_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| msrc | cm1_rubygem-yajl-ruby_1.4.2-1_on_cbl_mariner_1.0 | — | — |
| yajl-ruby_project | yajl-ruby | < 1.4.2 | 1.4.2 |
| yajl-ruby_project | yajl-ruby | >= 0 < 1.4.3 | 1.4.3 |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:N
osv7.5HIGH
vendor_msrc7.5HIGH
vendor_ubuntu7.5HIGH
vendor_debian5.9MEDIUM
vendor_redhat5.9MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
yajl vulnerabilities
osv·2023-12-14·CVSS 7.5
[HIGH] yajl vulnerabilities
yajl vulnerabilities
USN-6233-1 fixed vulnerabilities in YAJL. This update provides the
corresponding updates for Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, and Ubuntu
23.04.
Original advisory details:
It was discovered that YAJL was not properly performing bounds checks when
decoding a string with escape sequences. If a user or automated system
using YAJL were tricked into processing specially crafted input, an
attacker could possibly use this issue to cause a denial of service
(application abort). (CVE-2017-16516)
It was discovered that YAJL was not properly handling memory allocation
when dealing with large inputs, which could lead to heap memory
corruption. If a user or automated system using YAJL were tricked into
running a specially crafted large input, an attacker could possibly use
th
OSV
yajl vulnerabilities
osv·2023-07-18·CVSS 7.5
CVE-2017-16516 [HIGH] yajl vulnerabilities
yajl vulnerabilities
It was discovered that YAJL was not properly performing bounds checks when
decoding a string with escape sequences. If a user or automated system
using YAJL were tricked into processing specially crafted input, an
attacker could possibly use this issue to cause a denial of service
(application abort). (CVE-2017-16516)
It was discovered that YAJL was not properly handling memory allocation
when dealing with large inputs, which could lead to heap memory
corruption. If a user or automated system using YAJL were tricked into
running a specially crafted large input, an attacker could possibly use
this issue to cause a denial of service. (CVE-2022-24795)
It was discovered that memory leaks existed in one of the YAJL parsing
functions. An attacker could possibly use this i
GHSA
Buffer Overflow in yajl-ruby
ghsa·2022-04-05
CVE-2022-24795 [MEDIUM] CWE-122 Buffer Overflow in yajl-ruby
Buffer Overflow in yajl-ruby
_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. ~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 practi
OSV
Buffer Overflow in yajl-ruby
osv·2022-04-05
CVE-2022-24795 [MEDIUM] Buffer Overflow in yajl-ruby
Buffer Overflow in yajl-ruby
_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. ~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 practi
OSV
CVE-2022-24795: yajl-ruby is a C binding to the YAJL JSON parsing and generation library
osv·2022-04-05·CVSS 7.5
CVE-2022-24795 [HIGH] CVE-2022-24795: yajl-ruby is a C binding to the YAJL JSON parsing and generation library
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 bu
Ubuntu
YAJL vulnerabilities
vendor_ubuntu·2023-12-14·CVSS 7.5
CVE-2023-33460 [HIGH] YAJL vulnerabilities
Title: YAJL vulnerabilities
Summary: Several security issues were fixed in YAJL.
USN-6233-1 fixed vulnerabilities in YAJL. This update provides the
corresponding updates for Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, and Ubuntu
23.04.
Original advisory details:
It was discovered that YAJL was not properly performing bounds checks when
decoding a string with escape sequences. If a user or automated system
using YAJL were tricked into processing specially crafted input, an
attacker could possibly use this issue to cause a denial of service
(application abort). (CVE-2017-16516)
It was discovered that YAJL was not properly handling memory allocation
when dealing with large inputs, which could lead to heap memory
corruption. If a user or automated system using YAJL were tricked into
running a spe
Ubuntu
YAJL vulnerabilities
vendor_ubuntu·2023-07-18·CVSS 7.5
CVE-2023-33460 [HIGH] YAJL vulnerabilities
Title: YAJL vulnerabilities
Summary: Several security issues were fixed in YAJL.
It was discovered that YAJL was not properly performing bounds checks when
decoding a string with escape sequences. If a user or automated system
using YAJL were tricked into processing specially crafted input, an
attacker could possibly use this issue to cause a denial of service
(application abort). (CVE-2017-16516)
It was discovered that YAJL was not properly handling memory allocation
when dealing with large inputs, which could lead to heap memory
corruption. If a user or automated system using YAJL were tricked into
running a specially crafted large input, an attacker could possibly use
this issue to cause a denial of service. (CVE-2022-24795)
It was discovered that memory leaks existed in one of the
Microsoft
Buffer Overflow and Integer Overflow in yajl-ruby
vendor_msrc·2022-04-12·CVSS 7.5
CVE-2022-24795 [MEDIUM] CWE-122 Buffer Overflow and Integer Overflow in yajl-ruby
Buffer Overflow and Integer Overflow in yajl-ruby
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
GitHub_M: GitHub_M
Customer Action Required: Yes
Remediation: CBL-Mariner Releases
Reference: https://learn
Red Hat
yajl: heap-based buffer overflow when handling large inputs due to an integer overflow
vendor_redhat·2022-04-05·CVSS 5.9
CVE-2022-24795 [MEDIUM] CWE-190 yajl: heap-based buffer overflow when handling large inputs due to an integer overflow
yajl: heap-based buffer overflow when handling large inputs due to an integer overflow
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 integ
Debian
CVE-2022-24795: burp - yajl-ruby is a C binding to the YAJL JSON parsing and generation library. The 1....
vendor_debian·2022·CVSS 5.9
CVE-2022-24795 [MEDIUM] CVE-2022-24795: burp - yajl-ruby is a C binding to the YAJL JSON parsing and generation library. The 1....
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 bu
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/brianmario/yajl-ruby/blob/7168bd79b888900aa94523301126f968a93eb3a6/ext/yajl/yajl_buf.c#L64https://github.com/brianmario/yajl-ruby/commit/7168bd79b888900aa94523301126f968a93eb3a6https://github.com/brianmario/yajl-ruby/security/advisories/GHSA-jj47-x69x-mxrmhttps://lists.debian.org/debian-lts-announce/2023/07/msg00013.htmlhttps://lists.debian.org/debian-lts-announce/2023/08/msg00003.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KLE3C4CECEJ4EUYI56KXI6OWACWXX7WN/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YO32YDJ74DADC7CMJNLSLBVWN5EXGF5J/https://github.com/brianmario/yajl-ruby/blob/7168bd79b888900aa94523301126f968a93eb3a6/ext/yajl/yajl_buf.c#L64https://github.com/brianmario/yajl-ruby/commit/7168bd79b888900aa94523301126f968a93eb3a6https://github.com/brianmario/yajl-ruby/security/advisories/GHSA-jj47-x69x-mxrmhttps://lists.debian.org/debian-lts-announce/2023/07/msg00013.htmlhttps://lists.debian.org/debian-lts-announce/2023/08/msg00003.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KLE3C4CECEJ4EUYI56KXI6OWACWXX7WN/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YO32YDJ74DADC7CMJNLSLBVWN5EXGF5J/
2022-04-05
Published