{"answers":{"affected":"2 open source packages ship an affected version, including rails_admin. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-39308 in the wild and no public exploit code.","fix":"Upgrade rails_admin to 3.1.3 or later.","what":"CVE-2024-39308 is a medium-severity cross-site scripting vulnerability in railsadminteam rails_admin, published on 8 Jul 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-39308 and fix it if it is affected.\n\nWhat it is: CVE-2024-39308 is a medium-severity cross-site scripting vulnerability in railsadminteam rails_admin, published on 8 Jul 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-39308 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- rails_admin (RubyGems): affected from 3.0.0.beta; fixed in 3.1.3\n- rails_admin (RubyGems): affected from 3.0.0.beta; fixed in 3.1.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-2024-39308/ (Markdown: https://insights.sbomify.com/CVE-2024-39308/index.md)","id":"CVE-2024-39308","markdown":"https://insights.sbomify.com/CVE-2024-39308/index.md","name":"CVE-2024-39308","record":{"aliases":["GHSA-8qgm-g2vv-vwvc","UBUNTU-CVE-2024-39308"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"RailsAdmin","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary scripts in the RailsAdmin list view via unescaped HTML title attributes, potentially compromising user sessions.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"rails_admin","vendor":"rails_admin_project"}],"cvss":{"score":6.8,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N","version":"3.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"RailsAdmin is a Rails engine that provides an interface for managing data. RailsAdmin list view has the XSS vulnerability, caused by improperly-escaped HTML title attribute. Upgrade to 3.1.3 or 2.2.2 (to be released).","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":"RailsAdmin Cross-site Scripting vulnerability in the list view","id":"CVE-2024-39308","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":2,"n_references":6,"next":{"headline":"ZDI-CAN-23894: Parse Server literalizeRegexPart SQL Injection Authentication Bypass Vulnerability","id":"CVE-2024-39309"},"packages":[{"ecosystem":"RubyGems","fixed":["3.1.3"],"introduced":["3.0.0.beta"],"last_affected":[],"package":"rails_admin","purl":null,"source":"GHSA-8qgm-g2vv-vwvc"},{"ecosystem":"RubyGems","fixed":["3.1.3"],"introduced":["3.0.0.beta"],"last_affected":[],"package":"rails_admin","purl":"pkg:gem/rails_admin","source":"GHSA-8qgm-g2vv-vwvc"}],"prev":{"headline":"Cross-Site Scripting (XSS) vulnerability via crafted ebooks in Kavita","id":"CVE-2024-39307"},"products":["rails_admin"],"published":"2024-07-08","related":[{"cvss_score":8.8,"headline":"Cross-site request forgery in rails_admin","id":"CVE-2016-10522","kev_date_added":null,"published":"2018-07-05"},{"cvss_score":6.1,"headline":"rails_admin ruby gem XSS vulnerability","id":"CVE-2020-36190","kev_date_added":null,"published":"2021-01-12"},{"cvss_score":6.1,"headline":"rails_admin ruby gem XSS","id":"CVE-2017-12098","kev_date_added":null,"published":"2018-01-19"}],"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":"2024-08-02","vendors":["railsadminteam"]},"summary":"Attackers can execute arbitrary scripts in the RailsAdmin list view via unescaped HTML title attributes, potentially compromising user sessions.","url":"https://insights.sbomify.com/CVE-2024-39308/"}