{"answers":{"affected":"3 open source packages ship an affected version, including bentoml. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27520 exists.","fix":"Upgrade bentoml to 1.4.3 or later.","what":"CVE-2025-27520 is a critical unsafe deserialization vulnerability in BentoML, published on 4 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-27520 and fix it if it is affected.\n\nWhat it is: CVE-2025-27520 is a critical unsafe deserialization vulnerability in BentoML, published on 4 Apr 2025. 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-2025-27520 exists.\n\nAffected packages and fixed versions:\n- bentoml (PyPI): affected from 1.3.4; fixed in 1.4.3\n- bentoml (PyPI): affected from 1.3.4; fixed in 1.4.3\n- bentoml (PyPI): affected from 1.3.4; fixed in 1.4.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-2025-27520/ (Markdown: https://insights.sbomify.com/CVE-2025-27520/index.md)","id":"CVE-2025-27520","markdown":"https://insights.sbomify.com/CVE-2025-27520/index.md","name":"CVE-2025-27520","record":{"aliases":["GHSA-33xw-247w-6hmc","PYSEC-2026-294"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python AI serving library","requires_auth":"none","summary":"Unauthenticated attackers can execute arbitrary code on servers using BentoML due to insecure deserialization in the serde module.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"bentoml","vendor":"bentoml"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"description":"BentoML is a Python library for building online serving systems optimized for AI apps and model inference. A Remote Code Execution (RCE) vulnerability caused by insecure deserialization has been identified in the latest version (v1.4.2) of BentoML. It allows any unauthenticated user to execute arbitrary code on the server. It exists an unsafe code segment in serde.py. This vulnerability is fixed in 1.4.3.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2025-04-04","github_poc":3,"max_poc_stars":0,"metasploit":1,"nuclei":0,"refs":[{"date":"2025-04-04","kind":"metasploit","ref":"exploit/linux/http/bentoml_rce_cve_2025_27520","stars":null,"title":"BentoML RCE"},{"date":"2025-09-22T12:56:22Z","kind":"github_poc","ref":"https://github.com/amalpvatayam67/day09-bentoml-deser-lab","stars":0,"title":"ay 09 — CVE-2025-27520 (BentoML-style insecure deserialization) — Local Docker lab"},{"date":"2026-02-04T18:18:34Z","kind":"github_poc","ref":"https://github.com/Evillm/CVE-2025-27520-PoC","stars":0,"title":null},{"date":"2026-07-24T13:59:14Z","kind":"github_poc","ref":"https://github.com/electricsheep08/CVE-2025-27520","stars":0,"title":"exploit for CVE-2025-27520 A Remote Code Execution (RCE) vulnerability caused by insecure deserialization  in the latest version (v1.4.2) of BentoML. It allows any unauthenticated user to execute arbitrary code on the server. It exists an unsafe code segment in serde.py. This vulnerability is fixed in 1.4.3."}],"tier":"weaponised"},"has_fix":true,"headline":"BentoML Allows Remote Code Execution (RCE) via Insecure Deserialization","id":"CVE-2025-27520","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"deserialization","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"Missing authorization in HarmonyOS","id":"CVE-2025-27521"},"packages":[{"ecosystem":"PyPI","fixed":["1.4.3"],"introduced":["1.3.4"],"last_affected":[],"package":"bentoml","purl":null,"source":"GHSA-33xw-247w-6hmc"},{"ecosystem":"PyPI","fixed":["1.4.3"],"introduced":["1.3.4"],"last_affected":[],"package":"bentoml","purl":"pkg:pypi/bentoml","source":"GHSA-33xw-247w-6hmc"},{"ecosystem":"PyPI","fixed":["1.4.3"],"introduced":["1.3.4"],"last_affected":[],"package":"bentoml","purl":"pkg:pypi/bentoml","source":"PYSEC-2026-294"}],"prev":{"headline":"Cognita Arbitrary File Write","id":"CVE-2025-27519"},"products":["BentoML"],"published":"2025-04-04","related":[{"cvss_score":9.9,"headline":"BentoML is Vulnerable to an SSRF Attack Through File Upload Processing","id":"CVE-2025-54381","kev_date_added":null,"published":"2025-07-29"},{"cvss_score":9.8,"headline":"Insecure Deserialization leads to RCE in BentoML's runner server","id":"CVE-2025-32375","kev_date_added":null,"published":"2025-04-09"},{"cvss_score":8.8,"headline":"BentoML: Dockerfile command injection via docker.base_image","id":"CVE-2026-44345","kev_date_added":null,"published":"2026-05-27"},{"cvss_score":8.8,"headline":"BentoML: Dockerfile command injection via envs[*].name in bentofile.yaml","id":"CVE-2026-44346","kev_date_added":null,"published":"2026-05-27"},{"cvss_score":8.8,"headline":"BentoML has a Server-Side Template Injection via unsandboxed Jinja2 Environment in Dockerfile generation","id":"CVE-2026-35044","kev_date_added":null,"published":"2026-04-06"},{"cvss_score":8.6,"headline":"BentoML has an Arbitrary File Write via Symlink Path Traversal in Tar Extraction","id":"CVE-2026-27905","kev_date_added":null,"published":"2026-03-03"}],"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)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-04","vendors":["bentoml"]},"summary":"Unauthenticated attackers can execute arbitrary code on servers using BentoML due to insecure deserialization in the serde module.","url":"https://insights.sbomify.com/CVE-2025-27520/"}