{"answers":{"affected":"4 open source packages ship an affected version, including llama-index-core and llama-index. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-3108 exists.","fix":"Upgrade llama-index-core to 0.12.41 or later.","what":"CVE-2025-3108 is a medium-severity unsafe deserialization vulnerability in run-llama/llama_index, published on 6 Jul 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-2025-3108 and fix it if it is affected.\n\nWhat it is: CVE-2025-3108 is a medium-severity unsafe deserialization vulnerability in run-llama/llama_index, published on 6 Jul 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-2025-3108 exists.\n\nAffected packages and fixed versions:\n- llama-index-core (PyPI): affected from 0.11.15; fixed in 0.12.41\n- llama-index-core (PyPI): affected from 0.11.15; fixed in 0.12.41\n- llama-index-core (PyPI): affected from 0.11.15; fixed in 0.12.41\n- llama-index (PyPI): affected from 0.12.27; fixed in 0.12.41\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-3108/ (Markdown: https://insights.sbomify.com/CVE-2025-3108/index.md)","id":"CVE-2025-3108","markdown":"https://insights.sbomify.com/CVE-2025-3108/index.md","name":"CVE-2025-3108","record":{"aliases":["GHSA-m84c-4c34-28gf","PYSEC-2025-249","PYSEC-2026-1564"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python LLM library","requires_auth":"none","summary":"Attackers can achieve remote code execution by exploiting unsafe pickle deserialization in the JsonPickleSerializer component of the llama_index library.","user_interaction":"required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[{"product":"llamaindex","vendor":"llamaindex"}],"cvss":{"score":5,"severity":"medium","source":"cna","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","version":"3.0"},"cwes":[{"id":"CWE-1112","name":"Incomplete Documentation of Program Execution"}],"description":"A critical deserialization vulnerability exists in the run-llama/llama_index library's JsonPickleSerializer component, affecting versions v0.12.27 through v0.12.40. This vulnerability allows remote code execution due to an insecure fallback to Python's pickle module. JsonPickleSerializer prioritizes deserialization using pickle.loads(), which can execute arbitrary code when processing untrusted data. Attackers can exploit this by crafting malicious payloads to achieve full system compromise. The root cause includes an insecure fallback mechanism, lack of validation or safeguards, misleading design, and violation of Python security guidelines.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Unsafe Deserialization in JsonPickleSerializer Enables Remote Code Execution in run-llama/llama_index","id":"CVE-2025-3108","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"deserialization","year":"2025"},"n_packages":4,"n_references":2,"next":{"headline":"Other in Access Server","id":"CVE-2025-3110"},"packages":[{"ecosystem":"PyPI","fixed":["0.12.41"],"introduced":["0.12.27"],"last_affected":[],"package":"llama-index","purl":"pkg:pypi/llama-index","source":"PYSEC-2025-249"},{"ecosystem":"PyPI","fixed":["0.12.41"],"introduced":["0.11.15"],"last_affected":[],"package":"llama-index-core","purl":null,"source":"GHSA-m84c-4c34-28gf"},{"ecosystem":"PyPI","fixed":["0.12.41"],"introduced":["0.11.15"],"last_affected":[],"package":"llama-index-core","purl":"pkg:pypi/llama-index-core","source":"GHSA-m84c-4c34-28gf"},{"ecosystem":"PyPI","fixed":["0.12.41"],"introduced":["0.11.15"],"last_affected":[],"package":"llama-index-core","purl":"pkg:pypi/llama-index-core","source":"PYSEC-2026-1564"}],"prev":{"headline":"Newsletters \u003c= 4.9.9.8 - Authenticated (Contributor+) SQL Injection orderby Parameter","id":"CVE-2025-3107"},"products":["run-llama/llama_index"],"published":"2025-07-06","related":[{"cvss_score":10,"headline":"SQL Injection to RCE in run-llama/llama_index","id":"CVE-2024-12909","kev_date_added":null,"published":"2025-03-20"},{"cvss_score":9.8,"headline":"SQL Injection in run-llama/llama_index","id":"CVE-2025-1793","kev_date_added":null,"published":"2025-06-05"},{"cvss_score":9.8,"headline":"SQL Injection in run-llama/llama_index","id":"CVE-2025-1750","kev_date_added":null,"published":"2025-06-02"},{"cvss_score":9.8,"headline":"SQL Injection in run-llama/llama_index","id":"CVE-2024-11958","kev_date_added":null,"published":"2025-03-20"},{"cvss_score":9.8,"headline":"Command Injection in run-llama/llama_index","id":"CVE-2024-3271","kev_date_added":null,"published":"2024-04-16"},{"cvss_score":9.8,"headline":"SQL injection in llama-index","id":"CVE-2024-23751","kev_date_added":null,"published":"2024-01-22"},{"cvss_score":8.8,"headline":"LlamaIndex includes an exec call for `import {cls_name}`","id":"CVE-2024-45201","kev_date_added":null,"published":"2024-08-22"}],"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":"PyPA Advisory Database","prefix":"PYSEC"},{"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-07-07","vendors":["run-llama"]},"summary":"Attackers can achieve remote code execution by exploiting unsafe pickle deserialization in the JsonPickleSerializer component of the llama_index library.","url":"https://insights.sbomify.com/CVE-2025-3108/"}