Skip to main content

stable-baselines3 CVE-2026-94093

| EUVDEUVD-2026-83800 LOW
Deserialization of Untrusted Data (CWE-502)
2026-09-20 VulDB GHSA-rh54-3493-vqgc
2.1
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious pickle in model/replay-buffer file
  2. Delivery
    Distribute via model hub or direct share
  3. Exploit
    Victim calls PPO.load/load_replay_buffer/VecNormalize.load
  4. Execution
    Pickle deserialization triggers payload
  5. Impact
    Arbitrary code execution as the user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a victim to load an attacker-controlled file through one of the core stable-baselines3 APIs - PPO.load (or any algorithm's load), load_replay_buffer, or VecNormalize.load - which internally deserialize via pickle in save_util.py with no safe-mode gate up through v2.9.0. The limiting factor is required user interaction: the attacker cannot trigger it remotely without the victim choosing to load the malicious model/replay-buffer/VecNormalize artifact (UI:P/UI:R). No authentication is bypassed and no special server configuration is needed; the realistic delivery channel is sharing or publishing poisoned RL checkpoints. Note the v2.9.0 weights_only=True hardening was reverted on master (PR #1913), and it only ever covered the PyTorch tensor path, not these core load APIs.

Impact

This is a classic Python pickle deserialization flaw (CWE-502) in the core load APIs of stable-baselines3 - PPO.load, load_replay_buffer, and VecNormalize.load in save_util.py. The vendor (VulDB) assigned a strikingly low CVSS 4.0 base of 2.1 with VC:L/VI:L/VA:L, which materially understates the impact: unsafe unpickling of an attacker-crafted file yields arbitrary code execution (full C/I/A compromise), not the 'Low' partial impacts scored. The 'launched remotely' framing is a VulDB CVE-mill overstatement - the vector is actually UI-gated (UI:P/UI:R): a victim must load an attacker-supplied saved model, replay buffer, or normalization file. So the honest picture is a low-probability-but-high-consequence issue: the E:P flag and description confirm publicly available exploit code exists, but there is no CISA KEV listing and no EPSS score provided, so there is no evidence of active or widespread exploitation. Priority is moderated by the required user action and the ML-workflow-specific delivery path (loading third-party checkpoints/models). Notably the one 'safe' path (weights_only=True added in v2.9.0) was reverted on master via PR #1913 for PyTorch 1.13 compatibility, and the core load APIs were never gated (comprehensive fix pending PR #2264) - so no released version is consistently safe. Verify remediation status against the vendor before relying on any version.

Exploit ScenarioDerived

An attacker publishes a malicious pre-trained RL agent, replay buffer, or VecNormalize file to a model hub, repo, or shares it directly, embedding a malicious pickle payload. A researcher or engineer runs PPO.load() (or load_replay_buffer/VecNormalize.load) on the untrusted file, and the embedded object executes arbitrary code on their machine with their privileges. Public exploit code for this unsafe-pickle pattern has been disclosed.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 20, 2026

Unsafe pickle deserialization in the core load APIs of DLR-RM stable-baselines3 up to 2.9.0 lets an attacker who supplies a crafted model, replay buffer, or VecNormalize artifact achieve arbitrary code execution when a victim loads it via PPO.load, load_replay_buffer, or VecNormalize.load. The flaw is a CWE-502 pickle deserialization issue with no safe-mode gate or opt-in guard in these functions, and publicly available exploit code exists; the practical attack path is sharing or publishing a poisoned reinforcement-learning checkpoint that the victim is induced to load. Our assessment scores it CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - remote delivery is possible but exploitation still hinges on a victim choosing to load the malicious file, and successful loading grants full confidentiality, integrity, and availability impact in the victim's process.

RemediationAI

No vendor-released patch is identified at time of analysis for the core load APIs: the v2.9.0 weights_only=True hardening covered only the PyTorch tensor path and was reverted on master by PR #1913, while the outstanding hardening tracked as PR #2264 has not shipped - so do not rely on 2.9.0 behavior as safe. Until PR #2264 lands, treat every .zip/.pkl model, replay-buffer, and VecNormalize artifact as executable code: never call PPO.load, load_replay_buffer, or VecNormalize.load on files from untrusted or unverified sources, and only load artifacts you produced yourself or that arrive over an authenticated channel with a verified checksum. Where only tensor weights must be moved, prefer explicitly invoking the loader with PyTorch's weights_only=True on a recent PyTorch build and validate that the checkpoint contains only tensors - noting the trade-off that this rejects legacy pickled payloads and can break loading of older checkpoints, which is exactly why the upstream change was reverted for PyTorch 1.13 compatibility. For environments that must consume third-party RL checkpoints, isolate loading in a locked-down sandbox or throwaway container with no credentials, no network reachability to internal services, and a read-only filesystem, and pre-screen artifacts with a pickle-aware static scanner - accepting that scanning is best-effort and does not guarantee detection of obfuscated payloads. If the separate Hugging Face Hub workflow is in use, apply the PR #41 gate in huggingface_sb3 as an additional (not sufficient) control. Track https://github.com/DLR-RM/stable-baselines3/issues/2281 and https://vuldb.com/vuln/408021 for the eventual fixed release and pin to it once published.

Affected VersionsENISA

stable-baselines3 2.6
stable-baselines3 2.5
stable-baselines3 2.8
stable-baselines3 2.4
stable-baselines3 2.1
stable-baselines3 2.9.0
stable-baselines3 2.2
stable-baselines3 2.3
stable-baselines3 2.0
stable-baselines3 2.7

Affected Packages

euvd stable_baselines3 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

stable-baselines3 serializes models, replay buffers, and VecNormalize statistics through Python's pickle module using PyTorch's torch.save/torch.load machinery inside save_util.py. Because pickle reconstructs arbitrary objects by importing modules and calling callables during unpickling, any artifact the victim loads executes attacker-controlled code in the loading process - the textbook CWE-502 pattern. The v2.9.0 release only hardened the PyTorch tensor load path with weights_only=True, which restricts unpickling to tensors and basic types; that change was subsequently reverted on master via PR #1913 ('Hotfix: revert loading with weights_only=True') for PyTorch 1.13 compatibility, so even the one nominally safe path is inconsistent across versions. Meanwhile PR #2281 was closed as a duplicate of #1831, and PR #41 only gated the separate huggingface_sb3 Hub loader rather than core stable_baselines3 APIs; the hardening tracked as PR #2264 has not shipped. The CPE cpe:2.3:a:dlr-rm:stable-baselines3:*:*:*:*:*:*:*:* and the VulDB entry (408021) confirm the DLR-RM stable-baselines3 package, up to and including 2.9.0, as the affected component, and the widespread practice of exchanging RL checkpoints via the Hugging Face Hub and GitHub makes the poisoned-artifact delivery channel realistic despite the required user interaction.

Know when Stable Baselines3 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 2.1 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
vuln.today AI 8.8 HIGH

Pickle deserialization yields arbitrary code execution (C/I/A:H), delivered over the network but requiring the victim to load a crafted file (UI:R); no privileges needed.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Severity Changed
Sep 20, 2026 - 23:22 NVD
MEDIUM LOW
CVSS changed
Sep 20, 2026 - 23:22 NVD
5.3 (MEDIUM) 2.1 (LOW)

DescriptionCVE.org

A security vulnerability has been detected in DLR-RM stable-baselines3 up to 2.9.0. This affects the function PPO.load/load_replay_buffer/VecNormalize.load of the file save_util.py. Such manipulation leads to deserialization. It is possible to launch the attack remotely. The exploit has been disclosed publicly and may be used. In v2.9.0 the PyTorch tensor load path is hardened (weights_only=True), but that hardening was later reverted on master via PR #1913 "Hotfix: revert loading with weights_only=True" [blocked] to fix PyTorch 1.13 compat - so even the one "safe" path is inconsistent across versions. #2281 was closed as a duplicate of #1831 since both are unsafe pickle deserialization - but #1831's fix (PR #41) only gated the Hugging Face Hub loader in the separate huggingface_sb3 package. This finding covers the core stable_baselines3 load APIs (PPO.load, load_replay_buffer, VecNormalize.load), which have no safe mode or gate and remained exploitable in v2.9.0 until the outstanding hardening (PR #2264) ships.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
most popular Python RL library, but exploit needs loading untrusted model files
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy