{"answers":{"affected":"6 open source packages ship an affected version, including cgi. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-27220 in the wild and no public exploit code.","fix":"Upgrade cgi to a fixed version for your release line: 0.3.5.1, 0.3.7 or 0.4.2.","what":"CVE-2025-27220 is a medium-severity denial of service vulnerability in ruby-lang CGI, published on 3 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-27220 and fix it if it is affected.\n\nWhat it is: CVE-2025-27220 is a medium-severity denial of service vulnerability in ruby-lang CGI, published on 3 Mar 2025. 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-2025-27220 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- cgi (RubyGems): affected all versions; fixed in 0.3.5.1\n- cgi (RubyGems): affected all versions; fixed in 0.3.5.1\n- cgi (RubyGems): affected from 0.3.6; fixed in 0.3.7\n- cgi (RubyGems): affected from 0.3.6; fixed in 0.3.7\n- cgi (RubyGems): affected from 0.4.0; fixed in 0.4.2\n- cgi (RubyGems): affected from 0.4.0; fixed in 0.4.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-2025-27220/ (Markdown: https://insights.sbomify.com/CVE-2025-27220/index.md)","id":"CVE-2025-27220","markdown":"https://insights.sbomify.com/CVE-2025-27220/index.md","name":"CVE-2025-27220","record":{"aliases":["AZL-57791","AZL-57938","CLEANSTART-2026-HJ24461","CLEANSTART-2026-QG16537","DEBIAN-CVE-2025-27220","ECHO-edf3-cb70-6d3e","GHSA-mhwm-jh88-3gjf","MINI-2wvv-m9c2-w53p","MINI-49jr-937q-vx25","MINI-cr6c-4q8v-9pq4","MINI-g3g5-ghh3-73cw","MINI-h83f-xfjx-qhqq","MINI-hgqx-qqw9-vr8x","MINI-jpgx-h29f-cpw7","MINI-jvpw-x8wj-36rp","MINI-mcw7-xvch-4wp2","MINI-qr83-65c3-3p4m","MINI-v7jm-jpr4-x324","MINI-wcpv-vhcx-3jfh","MINI-x449-3rrp-g8vq","UBUNTU-CVE-2025-27220"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby CGI library","requires_auth":"none","summary":"An attacker can cause a denial of service in Ruby applications using the CGI gem by exploiting a Regular Expression Denial of Service vulnerability in the escapeElement method.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"cgi","vendor":"ruby-lang"}],"cvss":{"score":4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"description":"In the CGI gem before 0.4.2 for Ruby, a Regular Expression Denial of Service (ReDoS) vulnerability exists in the Util#escapeElement method.","ecosystems":["RubyGems"],"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":"CGI has Regular Expression Denial of Service (ReDoS) potential in Util#escapeElement","id":"CVE-2025-27220","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"denial_of_service","year":"2025"},"n_packages":6,"n_references":2,"next":{"headline":"URI allows for userinfo Leakage in URI#join, URI#merge, and URI#+","id":"CVE-2025-27221"},"packages":[{"ecosystem":"RubyGems","fixed":["0.3.5.1"],"introduced":["0"],"last_affected":[],"package":"cgi","purl":null,"source":"GHSA-mhwm-jh88-3gjf"},{"ecosystem":"RubyGems","fixed":["0.3.5.1"],"introduced":["0"],"last_affected":[],"package":"cgi","purl":"pkg:gem/cgi","source":"GHSA-mhwm-jh88-3gjf"},{"ecosystem":"RubyGems","fixed":["0.3.7"],"introduced":["0.3.6"],"last_affected":[],"package":"cgi","purl":null,"source":"GHSA-mhwm-jh88-3gjf"},{"ecosystem":"RubyGems","fixed":["0.3.7"],"introduced":["0.3.6"],"last_affected":[],"package":"cgi","purl":"pkg:gem/cgi","source":"GHSA-mhwm-jh88-3gjf"},{"ecosystem":"RubyGems","fixed":["0.4.2"],"introduced":["0.4.0"],"last_affected":[],"package":"cgi","purl":null,"source":"GHSA-mhwm-jh88-3gjf"},{"ecosystem":"RubyGems","fixed":["0.4.2"],"introduced":["0.4.0"],"last_affected":[],"package":"cgi","purl":"pkg:gem/cgi","source":"GHSA-mhwm-jh88-3gjf"}],"prev":{"headline":"CGI has Denial of Service (DoS) potential in Cookie.parse","id":"CVE-2025-27219"},"products":["CGI"],"published":"2025-03-03","related":[{"cvss_score":5.8,"headline":"CGI has Denial of Service (DoS) potential in Cookie.parse","id":"CVE-2025-27219","kev_date_added":null,"published":"2025-03-03"}],"sources":[{"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":"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":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["ruby-lang"]},"summary":"An attacker can cause a denial of service in Ruby applications using the CGI gem by exploiting a Regular Expression Denial of Service vulnerability in the escapeElement method.","url":"https://insights.sbomify.com/CVE-2025-27220/"}