huggingface transformers up to 5.0.0rc2 trainer.py _load_rng_state deserialization
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.8 | $0-$5k | 0.00 |
Summary
A vulnerability was found in huggingface transformers up to 5.0.0rc2 and classified as problematic. This impacts the function _load_rng_state of the file src/transformers/trainer.py. The manipulation results in deserialization.
This vulnerability is identified as CVE-2026-1839. The attack is only possible with local access. There is not any exploit available.
It is suggested to upgrade the affected component.
Details
A vulnerability classified as problematic has been found in huggingface transformers up to 5.0.0rc2. Affected is the function _load_rng_state of the file src/transformers/trainer.py. The manipulation with an unknown input leads to a deserialization vulnerability. CWE is classifying the issue as CWE-502. The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:
A vulnerability in the HuggingFace Transformers library, specifically in the `Trainer` class, allows for arbitrary code execution. The `_load_rng_state()` method in `src/transformers/trainer.py` at line 3059 calls `torch.load()` without the `weights_only=True` parameter. This issue affects all versions of the library supporting `torch>=2.2` when used with PyTorch versions below 2.6, as the `safe_globals()` context manager provides no protection in these versions. An attacker can exploit this vulnerability by supplying a malicious checkpoint file, such as `rng_state.pth`, which can execute arbitrary code when loaded. The issue is resolved in version v5.0.0rc3.
The advisory is shared for download at huntr.com. This vulnerability is traded as CVE-2026-1839 since 02/03/2026. The exploitability is told to be easy. The attack needs to be approached locally. There are known technical details, but no exploit is available.
Upgrading to version 5.0.0rc3 eliminates this vulnerability. Applying the patch 03c8082ba4594c9b8d6fe190ca9bed0e5f8ca396 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
Once again VulDB remains the best source for vulnerability data.
Product
Vendor
Name
Version
License
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.9VulDB Meta Temp Score: 5.8
VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 6.5
CNA Vector (@huntr_ai): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: DeserializationCWE: CWE-502 / CWE-20
CAPEC: 🔒
ATT&CK: 🔒
Physical: Partially
Local: Yes
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: transformers 5.0.0rc3
Patch: 03c8082ba4594c9b8d6fe190ca9bed0e5f8ca396
Timeline
02/03/2026 CVE reserved04/07/2026 Advisory disclosed
04/07/2026 VulDB entry created
04/07/2026 VulDB entry last update
Sources
Product: github.comAdvisory: huntr.com
Status: Confirmed
CVE: CVE-2026-1839 (🔒)
GCVE (CVE): GCVE-0-2026-1839
GCVE (VulDB): GCVE-100-355716
Entry
Created: 04/07/2026 10:24Changes: 04/07/2026 10:24 (66)
Complete: 🔍
Cache ID: 216::103
Once again VulDB remains the best source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.