{"answers":{"affected":"2 open source packages ship an affected version, including yajl-ruby. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-24795 exists.","fix":"Upgrade yajl-ruby to 1.4.3 or later.","what":"CVE-2022-24795 is a medium-severity vulnerability in brianmario yajl-ruby, published on 5 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-24795 and fix it if it is affected.\n\nWhat it is: CVE-2022-24795 is a medium-severity vulnerability in brianmario yajl-ruby, published on 5 Apr 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-24795 exists.\n\nAffected packages and fixed versions:\n- yajl-ruby (RubyGems): affected all versions; fixed in 1.4.3\n- yajl-ruby (RubyGems): affected all versions; fixed in 1.4.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-24795/ (Markdown: https://insights.sbomify.com/CVE-2022-24795/index.md)","id":"CVE-2022-24795","markdown":"https://insights.sbomify.com/CVE-2022-24795/index.md","name":"CVE-2022-24795","record":{"aliases":["ALSA-2022:7524","ALSA-2022:8252","AZL-10552","AZL-35233","CLSA-2026-1791550583","DEBIAN-CVE-2022-24795","GHSA-jj47-x69x-mxrm","OESA-2022-1752","OESA-2022-1912","RHSA-2022:7524","RHSA-2022:8252","RLSA-2022:7524","RLSA-2022:8252","SUSE-SU-2022:1746-1","SUSE-SU-2022:1918-1","SUSE-SU-2022:3162-1","UBUNTU-CVE-2022-24795","openSUSE-SU-2024:12258-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby JSON library","requires_auth":"none","summary":"Integer overflow in yajl-ruby causes heap corruption and denial of service when processing large inputs, primarily affecting 32-bit systems.","user_interaction":"not_required","vuln_class":"integer_overflow"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"yajl-ruby","vendor":"yajl-ruby_project"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-190","name":"Integer Overflow or Wraparound"},{"id":"CWE-122","name":"Heap-based Buffer Overflow"}],"description":"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-\u003ealloc 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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:8::crb","Red Hat:enterprise_linux:9::appstream","Red Hat:enterprise_linux:9::crb","Rocky Linux:8","Rocky Linux:9","RubyGems","SUSE:Linux Enterprise Micro 5.1","SUSE:Linux Enterprise Micro 5.2","SUSE:Linux Enterprise Module for Basesystem 15 SP3","SUSE:Linux Enterprise Module for Basesystem 15 SP4","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Software Development Kit 12 SP5","SUSE:OpenStack Cloud Crowbar 8","SUSE:OpenStack Cloud Crowbar 9","openSUSE:Leap 15.3","openSUSE:Leap 15.4","openSUSE:Leap Micro 5.2"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Buffer Overflow and Integer Overflow in yajl-ruby","id":"CVE-2022-24795","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"integer_overflow","year":"2022"},"n_packages":33,"n_references":7,"next":{"headline":"Remote Command Injection in RaspberryMatic","id":"CVE-2022-24796"},"packages":[{"ecosystem":"RubyGems","fixed":["1.4.3"],"introduced":["0"],"last_affected":[],"package":"yajl-ruby","purl":null,"source":"GHSA-jj47-x69x-mxrm"},{"ecosystem":"RubyGems","fixed":["1.4.3"],"introduced":["0"],"last_affected":[],"package":"yajl-ruby","purl":"pkg:gem/yajl-ruby","source":"GHSA-jj47-x69x-mxrm"},{"ecosystem":"AlmaLinux:8","fixed":["2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl","purl":"pkg:rpm/almalinux/yajl","source":"ALSA-2022:7524"},{"ecosystem":"AlmaLinux:8","fixed":["2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl-devel","purl":"pkg:rpm/almalinux/yajl-devel","source":"ALSA-2022:7524"},{"ecosystem":"AlmaLinux:9","fixed":["2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl","purl":"pkg:rpm/almalinux/yajl","source":"ALSA-2022:8252"},{"ecosystem":"AlmaLinux:9","fixed":["2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl-devel","purl":"pkg:rpm/almalinux/yajl-devel","source":"ALSA-2022:8252"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl","purl":"pkg:rpm/redhat/yajl","source":"RHSA-2022:7524"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl-debuginfo","purl":"pkg:rpm/redhat/yajl-debuginfo","source":"RHSA-2022:7524"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl-debugsource","purl":"pkg:rpm/redhat/yajl-debugsource","source":"RHSA-2022:7524"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl-debuginfo","purl":"pkg:rpm/redhat/yajl-debuginfo","source":"RHSA-2022:7524"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl-debugsource","purl":"pkg:rpm/redhat/yajl-debugsource","source":"RHSA-2022:7524"},{"ecosystem":"Red Hat:enterprise_linux:8::crb","fixed":["0:2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl-devel","purl":"pkg:rpm/redhat/yajl-devel","source":"RHSA-2022:7524"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl","purl":"pkg:rpm/redhat/yajl","source":"RHSA-2022:8252"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl-debuginfo","purl":"pkg:rpm/redhat/yajl-debuginfo","source":"RHSA-2022:8252"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl-debugsource","purl":"pkg:rpm/redhat/yajl-debugsource","source":"RHSA-2022:8252"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl-debuginfo","purl":"pkg:rpm/redhat/yajl-debuginfo","source":"RHSA-2022:8252"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl-debugsource","purl":"pkg:rpm/redhat/yajl-debugsource","source":"RHSA-2022:8252"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl-devel","purl":"pkg:rpm/redhat/yajl-devel","source":"RHSA-2022:8252"},{"ecosystem":"Rocky Linux:8","fixed":["0:2.1.0-11.el8"],"introduced":["0"],"last_affected":[],"package":"yajl","purl":"pkg:rpm/rocky-linux/yajl?distro=rocky-linux-8\u0026epoch=0","source":"RLSA-2022:7524"},{"ecosystem":"Rocky Linux:9","fixed":["0:2.1.0-21.el9"],"introduced":["0"],"last_affected":[],"package":"yajl","purl":"pkg:rpm/rocky-linux/yajl?distro=rocky-linux-9\u0026epoch=0","source":"RLSA-2022:8252"},{"ecosystem":"Rocky Linux:9","fixed":["0:2.1.0-21.el9_0"],"introduced":["0"],"last_affected":[],"package":"yajl","purl":"pkg:rpm/rocky-linux/yajl?distro=rocky-linux-9-0-legacy\u0026epoch=0","source":"RLSA-2022:8252"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["2.1.0-150000.4.3.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/suse/libyajl\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2022:3162-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.2","fixed":["2.1.0-150000.4.3.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/suse/libyajl\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.2","source":"SUSE-SU-2022:3162-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP3","fixed":["2.1.0-150000.4.3.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/suse/libyajl\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3","source":"SUSE-SU-2022:3162-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP4","fixed":["2.1.0-150000.4.3.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/suse/libyajl\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4","source":"SUSE-SU-2022:3162-1"},{"ecosystem":"SUSE:Linux Enterprise Server 12 SP5","fixed":["2.0.1-18.7.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/suse/libyajl\u0026distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5","source":"SUSE-SU-2022:1746-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP5","fixed":["2.0.1-18.7.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/suse/libyajl\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5","source":"SUSE-SU-2022:1746-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP5","fixed":["2.0.1-18.7.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/suse/libyajl\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5","source":"SUSE-SU-2022:1746-1"},{"ecosystem":"SUSE:OpenStack Cloud Crowbar 8","fixed":["1.3.1-4.6.1"],"introduced":["0"],"last_affected":[],"package":"rubygem-yajl-ruby","purl":"pkg:rpm/suse/rubygem-yajl-ruby\u0026distro=SUSE%20OpenStack%20Cloud%20Crowbar%208","source":"SUSE-SU-2022:1918-1"},{"ecosystem":"SUSE:OpenStack Cloud Crowbar 9","fixed":["1.3.1-4.6.1"],"introduced":["0"],"last_affected":[],"package":"rubygem-yajl-ruby","purl":"pkg:rpm/suse/rubygem-yajl-ruby\u0026distro=SUSE%20OpenStack%20Cloud%20Crowbar%209","source":"SUSE-SU-2022:1918-1"},{"ecosystem":"openSUSE:Leap 15.3","fixed":["2.1.0-150000.4.3.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/opensuse/libyajl\u0026distro=openSUSE%20Leap%2015.3","source":"SUSE-SU-2022:3162-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["2.1.0-150000.4.3.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/opensuse/libyajl\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2022:3162-1"},{"ecosystem":"openSUSE:Leap Micro 5.2","fixed":["2.1.0-150000.4.3.1"],"introduced":["0"],"last_affected":[],"package":"libyajl","purl":"pkg:rpm/opensuse/libyajl\u0026distro=openSUSE%20Leap%20Micro%205.2","source":"SUSE-SU-2022:3162-1"}],"prev":{"headline":"Open Redirect in express-openid-connect","id":"CVE-2022-24794"},"products":["yajl-ruby"],"published":"2022-04-05","related":[],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"BSD","name":"Rocky Linux","prefix":"RLSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["brianmario"]},"summary":"Integer overflow in yajl-ruby causes heap corruption and denial of service when processing large inputs, primarily affecting 32-bit systems.","url":"https://insights.sbomify.com/CVE-2022-24795/"}