Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. bentoml
  4. ›
  5. CVE-2025-54381

CVE-2025-54381: BentoML SSRF Vulnerability in File Upload Processing

July 29, 2025 (updated July 30, 2025)

There’s an SSRF in the file upload processing system that allows remote attackers to make arbitrary HTTP requests from the server without authentication. The vulnerability exists in the serialization/deserialization handlers for multipart form data and JSON requests, which automatically download files from user-provided URLs without proper validation of internal network addresses.

The framework automatically registers any service endpoint with file-type parameters (pathlib.Path, PIL.Image.Image) as vulnerable to this attack, making it a framework-wide security issue that affects most real-world ML services handling file uploads. While BentoML implements basic URL scheme validation in the JSONSerde path, the MultipartSerde path has no validation whatsoever, and neither path restricts access to internal networks, cloud metadata endpoints, or localhost services.

The documentation explicitly promotes this URL-based file upload feature, making it an intended but insecure design that exposes all deployed services to SSRF attacks by default.

References

  • github.com/advisories/GHSA-mrmq-3q62-6cc8
  • github.com/bentoml/BentoML
  • github.com/bentoml/BentoML/commit/534c3584621da4ab954bdc3d814cc66b95ae5fb8
  • github.com/bentoml/BentoML/security/advisories/GHSA-mrmq-3q62-6cc8
  • nvd.nist.gov/vuln/detail/CVE-2025-54381

Code Behaviors & Features

Detect and mitigate CVE-2025-54381 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.4.0 before 1.4.19

Fixed versions

  • 1.4.19

Solution

Upgrade to version 1.4.19 or above.

Impact 9.9 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

pypi/bentoml/CVE-2025-54381.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 19 Aug 2025 12:18:44 +0000.