{"answers":{"affected":"2 open source packages ship an affected version, including ruby and ruby-min. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-28738 in the wild and no public exploit code.","fix":"Upgrade ruby to a fixed version for your release line: 3.0.4 or 3.1.2.","what":"CVE-2022-28738 is a critical use after free vulnerability in Ruby-Lang Ruby, published on 9 May 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-28738 and fix it if it is affected.\n\nWhat it is: CVE-2022-28738 is a critical use after free vulnerability in Ruby-Lang Ruby, published on 9 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-28738 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ruby (Bitnami): affected from 3.0.0; fixed in 3.0.4, 3.1.2\n- ruby-min (Bitnami): affected from 3.0.0; fixed in 3.0.4, 3.1.2\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-28738/ (Markdown: https://insights.sbomify.com/CVE-2022-28738/index.md)","id":"CVE-2022-28738","markdown":"https://insights.sbomify.com/CVE-2022-28738/index.md","name":"CVE-2022-28738","record":{"aliases":["ALPINE-CVE-2022-28738","BIT-ruby-2022-28738","BIT-ruby-min-2022-28738","CLEANSTART-2026-WY79580","GHSA-8pqg-8p79-j5j8","UBUNTU-CVE-2022-28738"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby programming language","requires_auth":"none","summary":"A double free in the Ruby Regexp compiler allows attackers to write to unexpected memory locations, potentially leading to code execution.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"ruby","vendor":"ruby-lang"}],"cvss":{"score":9.8,"severity":"critical","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-415","name":"Double Free"}],"description":"A double free was found in the Regexp compiler in Ruby 3.x before 3.0.4 and 3.1.x before 3.1.2. If a victim attempts to create a Regexp from untrusted user input, an attacker may be able to write to unexpected memory locations.","ecosystems":["Bitnami"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Use after free in n/a","id":"CVE-2022-28738","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"ruby-lang:ruby","products":["ruby-lang:ruby"],"type":"use_after_free","year":"2022"},"n_packages":2,"n_references":5,"next":{"headline":"Memory corruption in n/a","id":"CVE-2022-28739"},"packages":[{"ecosystem":"Bitnami","fixed":["3.0.4","3.1.2"],"introduced":["3.0.0","3.1.0"],"last_affected":[],"package":"ruby","purl":"pkg:bitnami/ruby","source":"BIT-ruby-2022-28738"},{"ecosystem":"Bitnami","fixed":["3.0.4","3.1.2"],"introduced":["3.0.0","3.1.0"],"last_affected":[],"package":"ruby-min","purl":"pkg:bitnami/ruby-min","source":"BIT-ruby-min-2022-28738"}],"prev":{"headline":"There's a possible overflow in handle_image() when shim tries to load and execute crafted EFI executables","id":"CVE-2022-28737"},"products":["n/a"],"published":"2022-05-09","related":[{"cvss_score":10,"headline":"Memory corruption in n/a","id":"CVE-2009-4124","kev_date_added":null,"published":"2009-12-11"},{"cvss_score":9.8,"headline":"Weak cryptography in OpenSSL extension of Ruby (Git trunk)","id":"CVE-2011-4121","kev_date_added":null,"published":"2019-11-26"},{"cvss_score":9.8,"headline":"Command injection in n/a","id":"CVE-2017-17790","kev_date_added":null,"published":"2017-12-20"},{"cvss_score":9.8,"headline":"Memory corruption in n/a","id":"CVE-2017-11465","kev_date_added":null,"published":"2017-07-19"},{"cvss_score":9.8,"headline":"Memory corruption in Ruby","id":"CVE-2016-2336","kev_date_added":null,"published":"2017-01-06"},{"cvss_score":9.8,"headline":"Code injection in Ruby","id":"CVE-2016-2337","kev_date_added":null,"published":"2017-01-06"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["n/a"]},"summary":"A double free in the Ruby Regexp compiler allows attackers to write to unexpected memory locations, potentially leading to code execution.","url":"https://insights.sbomify.com/CVE-2022-28738/"}