CVE-2025-54381: BentoML: unauthenticated SSRF via file upload URLs
GHSA-mrmq-3q62-6cc8 CRITICAL PoC AVAILABLE CISA: TRACK*Any BentoML deployment on versions 1.4.0–1.4.18 is exploitable by unauthenticated external attackers to reach cloud metadata endpoints (AWS IMDSv1, GCP, Azure IMDS) and steal IAM credentials in a single request. Patch to 1.4.19 immediately and audit CloudTrail/GCP Audit Logs for metadata endpoint calls during the exposure window. The flaw was documented as an intended feature, meaning it has been present and exploitable since 1.4.0 with zero barrier to exploitation.
Risk Assessment
Critical. CVSS 9.9 reflects no-auth, low-complexity exploitation with changed scope — meaning a compromise of BentoML can cascade to systems beyond the application itself. In cloud-native deployments, this is effectively a one-step path to full cloud account compromise: BentoML instances typically run with IAM roles granting broad access to S3 buckets, model registries, GPU instances, and MLflow/SageMaker resources. EPSS at 0.5% is currently low but expects upward pressure once PoC tooling circulates — the attack pattern is well-understood and trivially reproducible. The 'intended design' classification means no exploit development is needed; the documented API is the exploit.
Affected Systems
Severity & Risk
Attack Surface
Recommended Action
5 steps-
PATCH
Upgrade BentoML to 1.4.19 immediately — this is the only complete fix.
-
DETECT
Review access logs for POST requests to file upload endpoints containing URLs pointing to RFC1918 ranges (10.x, 172.16-31.x, 192.168.x), link-local (169.254.x.x), or internal hostnames.
-
CONTAIN
If immediate patching is blocked, apply egress network policy restricting outbound HTTP from BentoML containers to known external endpoints only — deny all to 169.254.0.0/16 and internal subnets at the network layer.
-
CLOUD HARDENING
Enforce IMDSv2 (token-required, PUT-based) on all EC2 instances running BentoML to significantly raise SSRF exploitation difficulty. Apply equivalent controls on GCP (disable legacy metadata) and Azure (use IMDS v2 endpoints).
-
AUDIT
Query CloudTrail for GetCallerIdentity and metadata endpoint calls (169.254.169.254) from BentoML service IPs since version 1.4.0 deployment date. Review IAM roles assigned to BentoML instances for excessive permissions.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2025-54381?
Any BentoML deployment on versions 1.4.0–1.4.18 is exploitable by unauthenticated external attackers to reach cloud metadata endpoints (AWS IMDSv1, GCP, Azure IMDS) and steal IAM credentials in a single request. Patch to 1.4.19 immediately and audit CloudTrail/GCP Audit Logs for metadata endpoint calls during the exposure window. The flaw was documented as an intended feature, meaning it has been present and exploitable since 1.4.0 with zero barrier to exploitation.
Is CVE-2025-54381 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2025-54381, increasing the risk of exploitation.
How to fix CVE-2025-54381?
1. PATCH: Upgrade BentoML to 1.4.19 immediately — this is the only complete fix. 2. DETECT: Review access logs for POST requests to file upload endpoints containing URLs pointing to RFC1918 ranges (10.x, 172.16-31.x, 192.168.x), link-local (169.254.x.x), or internal hostnames. 3. CONTAIN: If immediate patching is blocked, apply egress network policy restricting outbound HTTP from BentoML containers to known external endpoints only — deny all to 169.254.0.0/16 and internal subnets at the network layer. 4. CLOUD HARDENING: Enforce IMDSv2 (token-required, PUT-based) on all EC2 instances running BentoML to significantly raise SSRF exploitation difficulty. Apply equivalent controls on GCP (disable legacy metadata) and Azure (use IMDS v2 endpoints). 5. AUDIT: Query CloudTrail for GetCallerIdentity and metadata endpoint calls (169.254.169.254) from BentoML service IPs since version 1.4.0 deployment date. Review IAM roles assigned to BentoML instances for excessive permissions.
What systems are affected by CVE-2025-54381?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference API endpoints, MLOps pipelines, cloud-deployed AI services, multi-model serving platforms.
What is the CVSS score for CVE-2025-54381?
CVE-2025-54381 has a CVSS v3.1 base score of 9.9 (CRITICAL). The EPSS exploitation probability is 0.66%.
Technical Details
NVD Description
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. In versions 1.4.0 until 1.4.19, the file upload processing system contains an SSRF vulnerability that allows unauthenticated remote attackers to force the server to make arbitrary HTTP requests. The vulnerability stems from the multipart form data and JSON request handlers, which automatically download files from user-provided URLs without validating whether those URLs point to internal network addresses, cloud metadata endpoints, or other restricted resources. The documentation explicitly promotes this URL-based file upload feature, making it an intended design that exposes all deployed services to SSRF attacks by default. Version 1.4.19 contains a patch for the issue.
Exploitation Scenario
An adversary identifies a public BentoML model inference API (discoverable via Shodan, GitHub, or API documentation). They craft a multipart form POST with a file_url parameter set to 'http://169.254.169.254/latest/meta-data/iam/security-credentials/'. BentoML's upload handler fetches the URL server-side without validation, returning the EC2 instance's IAM role name. A follow-up request to the role-specific metadata URL returns temporary AWS credentials (AccessKeyId, SecretAccessKey, SessionToken). The attacker uses these credentials to enumerate S3 buckets containing training data and model weights, access SageMaker endpoints, and pivot laterally into the broader AWS environment. Total exploitation time: under 5 minutes. No ML knowledge, no authentication, and no prior access required.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:L References
- github.com/advisories/GHSA-mrmq-3q62-6cc8
- nvd.nist.gov/vuln/detail/CVE-2025-54381
- github.com/bentoml/BentoML/commit/534c3584621da4ab954bdc3d814cc66b95ae5fb8 Patch
- github.com/bentoml/BentoML/security/advisories/GHSA-mrmq-3q62-6cc8 Exploit Mitigation Vendor
- github.com/ARPSyndicate/cve-scores Exploit
- github.com/B1ack4sh/Blackash-CVE-2025-54381 Exploit
- github.com/JoshuaMart/JoshuaMart Exploit
- github.com/PuddinCat/GithubRepoSpider Exploit
- github.com/nomi-sec/PoC-in-GitHub Exploit
- github.com/rockmelodies/bentoml_CVE-2025-54381 Exploit
Timeline
Related Vulnerabilities
CVE-2024-9070 9.8 BentoML: unauthenticated RCE via runner deserialization
Same package: bentoml CVE-2025-27520 9.8 BentoML: unauthenticated RCE via insecure deserialization
Same package: bentoml CVE-2025-32375 9.8 BentoML: RCE via insecure deserialization in runner
Same package: bentoml CVE-2026-35044 8.8 BentoML: malicious bento archive RCE via Jinja2 SSTI
Same package: bentoml CVE-2026-27905 7.8 bentoml: security flaw enables exploitation
Same package: bentoml
AI Threat Alert