{"answers":{"affected":"3 open source packages ship an affected version, including github.com/mudler/LocalAI. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-9900 exists.","fix":"Upgrade github.com/mudler/LocalAI to 2.22.0 or later.","what":"CVE-2024-9900 is a medium-severity cross-site scripting vulnerability in mudler/localai, published on 20 Mar 2025. 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-9900 and fix it if it is affected.\n\nWhat it is: CVE-2024-9900 is a medium-severity cross-site scripting vulnerability in mudler/localai, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-9900 exists.\n\nAffected packages and fixed versions:\n- github.com/mudler/LocalAI (Go): affected all versions; no fix listed\n- github.com/mudler/LocalAI (Go): affected all versions; fixed in 2.22.0\n- github.com/mudler/LocalAI (Go): affected all versions; fixed in 2.22.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-9900/ (Markdown: https://insights.sbomify.com/CVE-2024-9900/index.md)","id":"CVE-2024-9900","markdown":"https://insights.sbomify.com/CVE-2024-9900/index.md","name":"CVE-2024-9900","record":{"aliases":["GHSA-w6hh-w36c-vxmw","GO-2025-3542"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["account_takeover","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"LocalAI server","requires_auth":"none","summary":"Attackers can inject malicious JavaScript via search input in LocalAI, potentially stealing session cookies or hijacking user sessions.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"localai","vendor":"mudler"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","version":"3.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"mudler/localai version v2.21.1 contains a Cross-Site Scripting (XSS) vulnerability in its search functionality. The vulnerability arises due to improper sanitization of user input, allowing the injection and execution of arbitrary JavaScript code. This can lead to the execution of malicious scripts in the context of the victim's browser, potentially compromising user sessions, stealing session cookies, redirecting users to malicious websites, or manipulating the DOM.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Cross-Site Scripting (XSS) in mudler/localai","id":"CVE-2024-9900","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"Ansible-core: ansible-core user may read/write unauthorized content","id":"CVE-2024-9902"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/mudler/LocalAI","purl":"pkg:golang/github.com/mudler/LocalAI","source":"GO-2025-3542"},{"ecosystem":"Go","fixed":["2.22.0"],"introduced":["0"],"last_affected":[],"package":"github.com/mudler/LocalAI","purl":null,"source":"GHSA-w6hh-w36c-vxmw"},{"ecosystem":"Go","fixed":["2.22.0"],"introduced":["0"],"last_affected":[],"package":"github.com/mudler/LocalAI","purl":"pkg:golang/github.com/mudler/LocalAI","source":"GHSA-w6hh-w36c-vxmw"}],"prev":{"headline":"Parallax Image \u003c= 1.8 - Authenticated (Contributor+) Stored Cross-Site Scripting via dd-parallax Shortcode","id":"CVE-2024-9898"},"products":["mudler/localai"],"published":"2025-03-20","related":[{"cvss_score":9.8,"headline":"Command Injection in mudler/localai","id":"CVE-2024-5181","kev_date_added":null,"published":"2024-06-26"},{"cvss_score":9.8,"headline":"Command Injection in mudler/localai","id":"CVE-2024-2029","kev_date_added":null,"published":"2024-04-10"},{"cvss_score":8.8,"headline":"Remote Code Execution in mudler/localai","id":"CVE-2024-6983","kev_date_added":null,"published":"2024-09-27"},{"cvss_score":8.1,"headline":"Arbitrary File Write in mudler/LocalAI","id":"CVE-2024-6868","kev_date_added":null,"published":"2024-10-29"},{"cvss_score":7.5,"headline":"Timing Attack in mudler/localai","id":"CVE-2024-7010","kev_date_added":null,"published":"2024-10-29"},{"cvss_score":7.5,"headline":"Path Traversal in mudler/localai","id":"CVE-2024-5182","kev_date_added":null,"published":"2024-06-19"},{"cvss_score":6.5,"headline":"Cross-Site Request Forgery (CSRF) Vulnerability in mudler/localai","id":"CVE-2024-3135","kev_date_added":null,"published":"2024-04-01"}],"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":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"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-04","vendors":["mudler"]},"summary":"Attackers can inject malicious JavaScript via search input in LocalAI, potentially stealing session cookies or hijacking user sessions.","url":"https://insights.sbomify.com/CVE-2024-9900/"}