{"answers":{"affected":"2 open source packages ship an affected version, including sinatra.","exploited":"There is no known exploitation of CVE-2024-21510 in the wild and no public exploit code.","fix":"Upgrade sinatra to 4.1.0 or later.","what":"CVE-2024-21510 is a medium-severity vulnerability in sinatra, published on 1 Nov 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-21510 and fix it if it is affected.\n\nWhat it is: CVE-2024-21510 is a medium-severity vulnerability in sinatra, published on 1 Nov 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-21510 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- sinatra (RubyGems): affected all versions; fixed in 4.1.0\n- sinatra (RubyGems): affected all versions; fixed in 4.1.0\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-2024-21510/ (Markdown: https://insights.sbomify.com/CVE-2024-21510/index.md)","id":"CVE-2024-21510","markdown":"https://insights.sbomify.com/CVE-2024-21510/index.md","name":"CVE-2024-21510","record":{"aliases":["ALSA-2024:10987","DEBIAN-CVE-2024-21510","GHSA-hxx2-7vcw-mqr3","MINI-2f74-7rjv-jw4j","MINI-33jv-44cm-fpvg","MINI-5597-w9j2-r2m5","MINI-56gv-qhh8-vq7q","MINI-5fvp-gm9j-j8wx","MINI-5gqg-pxw8-7jm7","MINI-5gw3-pj66-cc8f","MINI-7mm2-2m88-5532","MINI-8pff-rj6j-2j37","MINI-c4v3-9488-qvgv","MINI-jjcj-w4xx-8fqx","MINI-pr3m-4v85-xpxm","MINI-px9w-c7c2-9jr6","RHSA-2024:10987","RLSA-2024:10987","UBUNTU-CVE-2024-21510"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass","other"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby web framework","requires_auth":"none","summary":"Attackers can trigger open redirects or cache poisoning via the X-Forwarded-Host header in Sinatra applications, potentially leading to SSRF.","user_interaction":"required","vuln_class":"open_redirect"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"snyk","cpe":[],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P","version":"3.1"},"cwes":[{"id":"CWE-807","name":"Reliance on Untrusted Inputs in a Security Decision"}],"description":"Versions of the package sinatra from 0.0.0 are vulnerable to Reliance on Untrusted Inputs in a Security Decision via the X-Forwarded-Host (XFH) header. When making a request to a method with redirect applied, it is possible to trigger an Open Redirect Attack by inserting an arbitrary address into this header. If used for caching purposes, such as with servers like Nginx, or as a reverse proxy, without handling the X-Forwarded-Host header, attackers can potentially exploit Cache Poisoning or Routing-based SSRF.","ecosystems":["AlmaLinux:8","Red Hat:enterprise_linux:8::highavailability","Red Hat:enterprise_linux:8::resilientstorage","Rocky Linux:8","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":"Sinatra vulnerable to Reliance on Untrusted Inputs in a Security Decision","id":"CVE-2024-21510","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"open_redirect","year":"2024"},"n_packages":9,"n_references":4,"next":{"headline":"MySQL2 for Node Arbitrary Code Injection","id":"CVE-2024-21511"},"packages":[{"ecosystem":"RubyGems","fixed":["4.1.0"],"introduced":["0"],"last_affected":[],"package":"sinatra","purl":null,"source":"GHSA-hxx2-7vcw-mqr3"},{"ecosystem":"RubyGems","fixed":["4.1.0"],"introduced":["0"],"last_affected":[],"package":"sinatra","purl":"pkg:gem/sinatra","source":"GHSA-hxx2-7vcw-mqr3"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.18-2.el8_10.3.alma.1"],"introduced":["0"],"last_affected":[],"package":"pcs","purl":"pkg:rpm/almalinux/pcs","source":"ALSA-2024:10987"},{"ecosystem":"AlmaLinux:8","fixed":["0.10.18-2.el8_10.3.alma.1"],"introduced":["0"],"last_affected":[],"package":"pcs-snmp","purl":"pkg:rpm/almalinux/pcs-snmp","source":"ALSA-2024:10987"},{"ecosystem":"Red Hat:enterprise_linux:8::highavailability","fixed":["0:0.10.18-2.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"pcs","purl":"pkg:rpm/redhat/pcs","source":"RHSA-2024:10987"},{"ecosystem":"Red Hat:enterprise_linux:8::highavailability","fixed":["0:0.10.18-2.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"pcs-snmp","purl":"pkg:rpm/redhat/pcs-snmp","source":"RHSA-2024:10987"},{"ecosystem":"Red Hat:enterprise_linux:8::resilientstorage","fixed":["0:0.10.18-2.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"pcs","purl":"pkg:rpm/redhat/pcs","source":"RHSA-2024:10987"},{"ecosystem":"Red Hat:enterprise_linux:8::resilientstorage","fixed":["0:0.10.18-2.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"pcs-snmp","purl":"pkg:rpm/redhat/pcs-snmp","source":"RHSA-2024:10987"},{"ecosystem":"Rocky Linux:8","fixed":["0:0.10.18-2.el8_10.3"],"introduced":["0"],"last_affected":[],"package":"pcs","purl":"pkg:rpm/rocky-linux/pcs?distro=rocky-linux-8\u0026epoch=0","source":"RLSA-2024:10987"}],"prev":{"headline":"mysql2 vulnerable to Prototype Poisoning","id":"CVE-2024-21509"},"products":["sinatra"],"published":"2024-11-01","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":"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":"2024-11-18","vendors":["n/a"]},"summary":"Attackers can trigger open redirects or cache poisoning via the X-Forwarded-Host header in Sinatra applications, potentially leading to SSRF.","url":"https://insights.sbomify.com/CVE-2024-21510/"}