Bug 2361314 - CVE-2025-32434 python-torch: PyTorch: `torch.load` with `weights_only=True` leads to remote code execution [fedora-42]
Summary: CVE-2025-32434 python-torch: PyTorch: `torch.load` with `weights_only=True` l...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-torch
Version: 42
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
Assignee: Tom.Rix
QA Contact:
URL:
Whiteboard: {"flaws": ["1163b22e-b73c-4c02-b8b4-0...
Depends On:
Blocks: CVE-2025-32434
TreeView+ depends on / blocked
 
Reported: 2025-04-21 03:36 UTC by Avinash Hanwate
Modified: 2025-12-25 22:31 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Avinash Hanwate 2025-04-21 03:36:37 UTC
More information about this security flaw is available in the following bug:

https://bugzilla.redhat.com/show_bug.cgi?id=2360999

Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

Comment 1 Alexander Lent 2025-12-25 01:40:16 UTC
The fixing commit is https://github.com/pytorch/pytorch/commit/8d4b8a920a2172523deb95bf20e8e52d50649c04

Comment 2 Alexander Lent 2025-12-25 01:57:00 UTC
The issue is that even when using the safe configuration of weights_only=True in torch.load, if a file in the legacy tar format is provided, the load process continues unsafely since legacy tar files can only be loaded unsafely. Oops. The fixing commit adds a check to prevent this from happening.

The fix is present in 2.6.0 and newer, so only Fedora 42 is both currently maintained and impacted.

Comment 3 Alexander Lent 2025-12-25 22:31:42 UTC
Proposed fix is in https://src.fedoraproject.org/rpms/python-torch/pull-request/8


Note You need to log in before you can comment on or make changes to this bug.