{"answers":{"affected":"3 open source packages ship an affected version, including sentence-transformers.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-68770 exists.","fix":"Upgrade sentence-transformers to 5.6.0 or later.","what":"CVE-2026-68770 is a critical code injection vulnerability in Hugging Face sentence-transformers, published on 31 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-68770 and fix it if it is affected.\n\nWhat it is: CVE-2026-68770 is a critical code injection vulnerability in Hugging Face sentence-transformers, published on 31 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-68770 exists.\n\nAffected packages and fixed versions:\n- sentence-transformers (PyPI): affected all versions; fixed in 5.6.0\n- sentence-transformers (PyPI): affected all versions; fixed in 5.6.0\n- sentence-transformers (PyPI): affected all versions; fixed in 5.6.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-2026-68770/ (Markdown: https://insights.sbomify.com/CVE-2026-68770/index.md)","id":"CVE-2026-68770","markdown":"https://insights.sbomify.com/CVE-2026-68770/index.md","name":"CVE-2026-68770","record":{"aliases":["CLSA-2026-1790851862","ECHO-fe3d-8e4c-5919","GHSA-jhr6-gm9c-rqjv","PYSEC-2026-4164","ROOT-APP-PYPI-CVE-2026-68770"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python ML library","requires_auth":"none","summary":"Attackers with local file write access can execute arbitrary code by placing malicious files in a model directory, bypassing the trust_remote_code=False security control.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulnCheck","cpe":[],"cvss":{"score":9.3,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"sentence-transformers contains a security control bypass vulnerability that allows attackers to achieve arbitrary code execution by exploiting a logic flaw in the import_module_class helper within sentence_transformers/util/misc.py, where the guard condition includes an 'or os.path.exists(model_name_or_path)' clause that satisfies the trust gate whenever the supplied path exists on the local filesystem, regardless of the trust_remote_code=False argument. Attackers who can control or influence the contents of a model directory on disk can place malicious Python files such as modeling_*.py referenced via modules.json, causing the code to execute at import time when an application loads the model with SentenceTransformer(path, trust_remote_code=False), bypassing the documented security contract and achieving code execution within the loading process.","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":"sentence-transformers Arbitrary Code Execution on Local Model Load Despite trust_remote_code=False","id":"CVE-2026-68770","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2026"},"n_packages":3,"n_references":5,"next":{"headline":"ComfyUI 0.23.0 Unauthenticated RCE via LoadTrainingDataset Pickle Deserialization","id":"CVE-2026-68771"},"packages":[{"ecosystem":"PyPI","fixed":["5.6.0"],"introduced":["0"],"last_affected":[],"package":"sentence-transformers","purl":null,"source":"GHSA-jhr6-gm9c-rqjv"},{"ecosystem":"PyPI","fixed":["5.6.0"],"introduced":["0"],"last_affected":[],"package":"sentence-transformers","purl":"pkg:pypi/sentence-transformers","source":"GHSA-jhr6-gm9c-rqjv"},{"ecosystem":"PyPI","fixed":["5.6.0"],"introduced":["0"],"last_affected":[],"package":"sentence-transformers","purl":"pkg:pypi/sentence-transformers","source":"PYSEC-2026-4164"}],"prev":{"headline":"This CVE ID has been rejected or withdrawn by its CVE Numbering Authority.","id":"CVE-2026-68769"},"products":["sentence-transformers"],"published":"2026-07-31","related":[],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-10-08","vendors":["Hugging Face"]},"summary":"Attackers with local file write access can execute arbitrary code by placing malicious files in a model directory, bypassing the trust_remote_code=False security control.","url":"https://insights.sbomify.com/CVE-2026-68770/"}