CVE-2026-27905: BentoML Arbitrary File Write via Symlink Path Traversal in Tar Extraction

bentoml Updated 04 Mar 2026

Summary

03/03/2026
Yes i
High
8.6

CVE-2026-27905: BentoML Vulnerable to Arbitrary File Write via Symlink Path Traversal in Tar Extraction. Affects bentoml versions < 1.4.36. Fixed in 1.4.36. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

BentoML is an open-source framework designed for simplifying the deployment of machine learning models. It allows users to package models into 'bentos' and deploy them to various cloud platforms. The framework provides utilities for managing model files and dependencies, making it easier for data scientists and developers to serve their models. However, a vulnerability exists in the tar extraction process, which can lead to security risks if exploited.

Vulnerability Detail

The vulnerability arises from the safe_extract_tarfile() function in BentoML, which fails to properly validate symlink targets during tar file extraction. While the function checks that the symlink's own path is within the destination directory, it does not validate where the symlink points. An attacker can create a malicious tar file containing a symlink that points outside the intended extraction directory, allowing arbitrary file writes on the host filesystem. This can lead to severe consequences, including overwriting critical files and potential remote code execution.

How To Fix

Latest published version: 1.4.39 as of 23 Oct 2026

pip install --upgrade "bentoml==1.4.39"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.36

This is the first release that contains the fix.

pip install --upgrade "bentoml==1.4.36"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can manually validate symlink targets before extraction. Modify the safe_extract_tarfile() function as follows:

if member.issym():
    target = os.path.normpath(os.path.join(os.path.dirname(path), member.linkname))
    if not Path(target).is_relative_to(destination):
        logger.warning('Symlink %s points outside: %s', member.name, member.linkname)
        continue

This code checks if the symlink target is within the allowed directory before proceeding with the extraction.

Conclusion

CVE-2026-27905 presents a significant security risk for users of BentoML due to improper validation of symlink targets during tar extraction. It is crucial to update to the patched version or implement the suggested workaround to safeguard against potential exploitation.

See every vulnerability recorded for bentoml →

Share this vulnerability

FAQ

CVE-2026-27905 is a vulnerability in BentoML that allows arbitrary file writes via symlink path traversal during tar extraction.

An attacker can create a malicious tar file with a symlink pointing outside the extraction directory, allowing them to overwrite files on the host system.

Exploitation can lead to arbitrary file overwrites, remote code execution, and compromise of systems that pull malicious bentos from BentoCloud.

You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground.

If immediate updates are not possible, implement the provided workaround to validate symlink targets before extraction to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for bentoml.

How To Fix

Latest published version: 1.4.39 as of 23 Oct 2026

pip install --upgrade "bentoml==1.4.39"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.36

This is the first release that contains the fix.

pip install --upgrade "bentoml==1.4.36"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback