{"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-48057 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2024-48057 is a medium-severity cross-site scripting vulnerability in n/a, published on 4 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-48057 and fix it if it is affected.\n\nWhat it is: CVE-2024-48057 is a medium-severity cross-site scripting vulnerability in n/a, published on 4 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: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-48057 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 up to 2.20.1; no fix listed\n- github.com/mudler/LocalAI (Go): affected all versions up to 2.20.1; no fix listed\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-48057/ (Markdown: https://insights.sbomify.com/CVE-2024-48057/index.md)","id":"CVE-2024-48057","markdown":"https://insights.sbomify.com/CVE-2024-48057/index.md","name":"CVE-2024-48057","record":{"aliases":["CVE-2024-9901","GHSA-ghx4-cgxw-7h9p","GO-2024-3253"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"LocalAI server","requires_auth":"none","summary":"Attackers can inject malicious scripts via the delete model API, leading to stored XSS that executes when users visit the homepage.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"localai","vendor":"mudler"}],"cvss":{"score":6.1,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"description":"localai \u003c=2.20.1 is vulnerable to Cross Site Scripting (XSS). When calling the delete model API and passing inappropriate parameters, it can cause a one-time storage XSS, which will trigger the payload when a user accesses the homepage.","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":"LocalAI Cross-site Scripting vulnerability","id":"CVE-2024-48057","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"Cross-site scripting in n/a","id":"CVE-2024-48059"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/mudler/LocalAI","purl":"pkg:golang/github.com/mudler/LocalAI","source":"GO-2024-3253"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["2.20.1"],"package":"github.com/mudler/LocalAI","purl":null,"source":"GHSA-ghx4-cgxw-7h9p"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":["2.20.1"],"package":"github.com/mudler/LocalAI","purl":"pkg:golang/github.com/mudler/LocalAI","source":"GHSA-ghx4-cgxw-7h9p"}],"prev":{"headline":"gradio Server Side Request Forgery vulnerability","id":"CVE-2024-48052"},"products":["n/a"],"published":"2024-11-04","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":"2024-11-05","vendors":["n/a"]},"summary":"Attackers can inject malicious scripts via the delete model API, leading to stored XSS that executes when users visit the homepage.","url":"https://insights.sbomify.com/CVE-2024-48057/"}