CVE-2025-27520

9.8 CRITICAL

📋 TL;DR

CVE-2025-27520 is a critical remote code execution vulnerability in BentoML caused by insecure deserialization in serde.py. It allows unauthenticated attackers to execute arbitrary code on servers running vulnerable versions. All users of BentoML versions up to 1.4.2 are affected.

💻 Affected Systems

Products:
  • BentoML
Versions: All versions up to and including 1.4.2
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Any BentoML deployment with the vulnerable serde.py component is affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with attacker gaining full control over the server, data exfiltration, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Server takeover leading to data theft, cryptocurrency mining, or use as part of a botnet for DDoS attacks.

🟢

If Mitigated

Limited impact if proper network segmentation and least privilege principles are implemented, though RCE still poses significant risk.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability requires no authentication and exploits insecure deserialization, which typically has low exploitation complexity.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.4.3

Vendor Advisory: https://github.com/bentoml/BentoML/security/advisories/GHSA-33xw-247w-6hmc

Restart Required: Yes

Instructions:

1. Stop all BentoML services. 2. Update BentoML using pip: pip install --upgrade bentoml==1.4.3. 3. Restart all BentoML services.

🔧 Temporary Workarounds

Network Isolation

linux

Restrict network access to BentoML services to trusted IPs only

iptables -A INPUT -p tcp --dport <bentoml_port> -s <trusted_ip> -j ACCEPT
iptables -A INPUT -p tcp --dport <bentoml_port> -j DROP

🧯 If You Can't Patch

  • Implement strict network segmentation and firewall rules to limit access to BentoML services
  • Deploy web application firewall (WAF) with deserialization attack detection rules

🔍 How to Verify

Check if Vulnerable:

Check BentoML version: python -c "import bentoml; print(bentoml.__version__)"

Check Version:

python -c "import bentoml; print(bentoml.__version__)"

Verify Fix Applied:

Verify version is 1.4.3 or higher: python -c "import bentoml; assert bentoml.__version__ >= '1.4.3', 'Vulnerable version'"

📡 Detection & Monitoring

Log Indicators:

  • Unusual process spawns from BentoML services
  • Suspicious deserialization attempts in application logs
  • Unexpected network connections from BentoML processes

Network Indicators:

  • Malformed serialization payloads to BentoML endpoints
  • Unusual outbound connections from BentoML servers

SIEM Query:

source="bentoml.logs" AND ("deserialization" OR "pickle" OR "yaml.load")

🔗 References

📤 Share & Export