CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-24123

BentoML Path Traversal: Packaging Your Secrets Alongside Your AI Models

Alon Barad
Alon Barad
Software Engineer

Jan 26, 2026·6 min read·30 visits

Executive Summary (TL;DR)

BentoML versions before 1.4.34 fail to validate file paths in `bentofile.yaml`. An attacker can craft a project configuration that references absolute paths like `/etc/passwd` or `~/.ssh/id_rsa`. When a victim runs `bentoml build` on this project, the targeted files are read and baked into the final artifact, allowing the attacker to steal secrets from developer machines or CI/CD pipelines.

A critical path traversal vulnerability in BentoML allows attackers to create malicious configuration files that, when built by a victim, silently exfiltrate sensitive local files (SSH keys, AWS credentials) into the resulting model archive. This turns standard ML build pipelines into data exfiltration engines.

The Hook: The AI Supply Chain Trojan

The AI ecosystem is the Wild West of software development right now. Developers are pulling models from Hugging Face, cloning random GitHub repositories, and running inference pipelines with root privileges, all in the name of "velocity." BentoML is a fantastic tool in this space—it takes the headache out of packaging machine learning models into deployable Docker containers (called "Bentos"). It’s the "docker build" for the AI crowd.

But here is the problem: convenience often murders security. When you run bentoml build, the tool reads a configuration file (bentofile.yaml) to understand what files to include in the package. It expects things like python scripts, model weights, and readmes.

CVE-2026-24123 is what happens when that tool trusts you a little too much. It turns the bentoml build command into a file exfiltration utility. Imagine downloading a "state-of-the-art LLM wrapper," running the build command to containerize it, and unknowingly uploading your private SSH keys or AWS credentials inside the resulting Docker image. It is a classic supply chain poison pill, and it works because the code simply assumed that nobody would ever ask it to read /etc/shadow.

The Flaw: Trusting the Path

At its core, this is a textbook Path Traversal (CWE-22) vulnerability, but with a twist. Usually, we see path traversal in web servers where an attacker requests ../../../../etc/passwd. Here, the traversal happens during the build process.

BentoML allows users to specify descriptions and template files in the bentofile.yaml. For example:

description: "file:README.md"

The intention is innocent: read the local README.md and use it as the description for the Bento. However, the logic handling this directive lacked what we call "containment checks." It blindly resolved whatever path was provided.

If you gave it a relative path, it joined it to the current directory. If you gave it an absolute path (on Linux/macOS) or a drive letter path (on Windows), the underlying Python os.path functions happily obliged. There was no jail, no chroot, and no validation ensuring the resolved path was actually inside the project directory.

This is the digital equivalent of a hotel concierge who, when asked to fetch a towel from "room 101", complies. But when asked to fetch a towel from "the bank vault across the street", also complies, breaks into the vault, and brings you the gold bars wrapped in a towel.

The Smoking Gun: Analysis of `filesystem.py`

Let's look at the vulnerable code in src/bentoml/_internal/utils/filesystem.py. The function resolve_user_filepath was responsible for figuring out where files lived. Here is a simplified view of the logic prior to the fix:

def resolve_user_filepath(filepath: str, ctx: t.Optional[str]) -> str:
    # Expand ~ to home directory and $VAR environment variables
    _path = os.path.expanduser(os.path.expandvars(filepath))
    
    # If it's relative, join it with the context (project root)
    if not os.path.isabs(_path) and ctx:
        _path = os.path.expanduser(os.path.join(ctx, filepath))
        
    if os.path.exists(_path):
        # 🚩 VULNERABILITY: Just resolves the path. 
        # No check to see if we escaped 'ctx'.
        return os.path.realpath(_path) 
        
    raise FileNotFoundError(f"file {filepath} not found")

The patch (Commit 84d08cfeb40c5f2ce71b3d3444bbaa0fb16b5ca4) introduces a secure flag and rigorous validation:

# THE FIX
if secure:
    # 1. Block absolute paths
    if os.path.isabs(_path):
        raise ValueError("Absolute paths are not allowed...")
    
    # 2. Block hidden files/dirs (like .ssh or .aws)
    if any(p.startswith(".") for p in pathlib.Path(_path).parts):
         raise ValueError("Hidden files are not allowed...")
 
    # 3. Ensure containment within CWD
    # Uses pathlib.Path.is_relative_to()

The developers essentially had to reimplement a filesystem jail. They specifically added blocklists for sensitive system paths like /etc and /proc, acknowledging that standard path resolution is a minefield.

The Exploit: Stealing Secrets from CI/CD

How does an attacker weaponize this? The most dangerous vector is via CI/CD pipelines. Automated build environments often hold high-privilege secrets in environment variables (AWS_ACCESS_KEY_ID, GITHUB_TOKEN).

The Attack Chain

  1. Preparation: The attacker creates a malicious ML repository. It looks legitimate—maybe a fork of a popular model.
  2. The Trap: Inside bentofile.yaml, they inject the following directive:
    service: "service.py:MyModel"
    # The Payload
    description: "file:/proc/self/environ"
  3. The Trigger: The attacker submits a Pull Request or convinces a developer to clone and build the repo.
  4. The Heist: The victim runs bentoml build.
    • BentoML sees the description field.
    • It resolves /proc/self/environ (on Linux, this file contains the process's environment variables).
    • It reads the content of that file and writes it into README.md inside the generated Bento archive.
  5. Exfiltration: The built Bento is pushed to a registry (e.g., Docker Hub, AWS ECR) or distributed. The attacker downloads the image, extracts the README.md, and now has the victim's API keys.

This isn't limited to environment variables. An attacker could target ~/.ssh/id_rsa by using the docker.dockerfile_template field or ~/.aws/credentials.

The Impact: Why You Should Care

This vulnerability turns the build tool into a confused deputy. The impact is High Confidentiality Loss.

Consider the scenarios:

  • Developer Machines: If you run this on your laptop, the attacker gets your SSH keys, your kubeconfig, or your AWS credentials stored in ~/.aws/.
  • CI/CD Runners: If you use GitHub Actions or GitLab CI to build Bentos, the attacker steals the secrets injected into that runner. This can lead to lateral movement into your cloud infrastructure.

Because BentoML is designed to package everything up nicely for distribution, it effectively cleans up the crime scene by wrapping the stolen loot in a legitimate-looking package. The user thinks they are deploying a model; they are actually deploying their own secrets.

Remediation: Locking the Door

If you are using BentoML, stop what you are doing and check your version.

The Fix: Update to BentoML version 1.4.34 or later immediately. The maintainers have implemented strict checks that prevent the build process from reading outside the build context directory. They also explicitly block access to hidden directories (like .ssh) and system paths.

Defense in Depth: Even with the patch, treat bentofile.yaml files like you treat package.json or requirements.txt scripts—with extreme suspicion. Never run build commands on untrusted repositories without auditing the configuration files first. If you are building inside CI/CD, ensure your runners have the minimum necessary privileges (Least Privilege Principle), so that even if a file read occurs, the blast radius is contained.

Official Patches

BentoMLOfficial patch commit restricting path resolution

Fix Analysis (1)

Technical Appendix

CVSS Score
7.4/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
EPSS Probability
0.10%
Top 100% most exploited

Affected Systems

BentoML < 1.4.34CI/CD Pipelines running BentoML build stepsDeveloper workstations used for ML engineering

Affected Versions Detail

Product
Affected Versions
Fixed Version
BentoML
BentoML
< 1.4.341.4.34
AttributeDetail
CWE IDCWE-22 (Path Traversal)
CVSS v3.17.4 (High)
Attack VectorNetwork / Supply Chain
ImpactConfidentiality (High)
Affected Componentbentoml build (filesystem.py)
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
T1552Unsecured Credentials
Credential Access
T1195Supply Chain Compromise
Initial Access
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Known Exploits & Detection

Internal ResearchPath traversal via description and docker fields in bentofile.yaml
NucleiDetection Template Available

Vulnerability Timeline

Vulnerability Published
2026-01-26
Patch Released in v1.4.34
2026-01-26

References & Sources

  • [1]GHSA Advisory: Arbitrary file read via bentofile.yaml
  • [2]CWE-22: Path Traversal

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•32 minutes ago•CVE-2026-55153
7.1

CVE-2026-55153: JNDI Injection and Deserialization Gadget Abuse in mchange-commons-java

A JNDI Injection and Deserialization Gadget vulnerability exists in mchange-commons-java prior to version 0.6.0. The com.mchange.v2.naming.JavaBeanObjectFactory component permits arbitrary class instantiation and setter invocation, allowing attackers to perform Server-Side Request Forgery (SSRF) and remote class loading.

Alon Barad
Alon Barad
1 views•5 min read
•about 2 hours ago•GHSA-8RW6-P7M8-63JP
6.5

GHSA-8RW6-P7M8-63JP: Array Element-Level SELECT Permissions Leak in SurrealDB

SurrealDB versions supporting element-level SELECT permissions on arrays are vulnerable to a logical authorization bypass. Due to an index-shifting error during array filtration, restricted elements can skip permission checks and leak to unauthorized record users.

Alon Barad
Alon Barad
3 views•6 min read
•about 24 hours ago•CVE-2026-12243
7.5

CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK

CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.

Amit Schendel
Amit Schendel
5 views•8 min read
•1 day ago•CVE-2026-73654
8.5

CVE-2026-73654: Prototype Pollution in Trigger.dev leading to Cascading Denial of Service

CVE-2026-73654 is a high-severity prototype pollution vulnerability in Trigger.dev. The flaw occurs during the handling of run-metadata updates through the PUT /api/v1/runs/:runId/metadata endpoint. Because user-supplied keys are parsed directly by the @jsonhero/path library without sanitization, an authenticated attacker with low privileges can pollute the global Object.prototype. This causes database queries via Prisma ORM to fail validation and induces unhandled exceptions in the Prometheus metrics client, resulting in a process-wide denial of service.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-73559
6.5

CVE-2026-73559: Uncontrolled Resource Consumption in vLLM API completions

CVE-2026-73559 is an uncontrolled resource consumption vulnerability in the vLLM engine, specifically within the /v1/completions API endpoint, allowing authenticated attackers to cause application-level denial of service via unbounded prompt arrays.

Amit Schendel
Amit Schendel
10 views•5 min read
•1 day ago•CVE-2026-54526
9.9

CVE-2026-54526: Strict Template Referencing Bypass and Privilege Escalation in Argo Workflows

A critical security bypass vulnerability in Argo Workflows allows authenticated attackers with workflow submission privileges to bypass 'Strict' or 'Secure' template referencing restrictions. By injecting unvalidated fields into the nested ArtifactGC configuration, attackers can execute arbitrary pod patches, leading to host namespace escape and cluster-wide privilege escalation.

Alon Barad
Alon Barad
15 views•6 min read