Skip to content
Submit incident
AII-1001-87039
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.

PyTorch unpack_sequence segmentation fault with empty tensors

PyTorch's unpack_sequence and pad_packed_sequence functions crash with a segmentation fault when handling empty tensors, due to missing error checking. The vulnerability affects PyTorch 2.6.0 and has been assigned CVE-2025-2999.

20 March 2025 Β· PyTorch Β· Security and cyberattacks
20 March 2025
AII-1001-870393 sources ↓
Quick facts
Organization
PyTorch (subject)
Category
Security and cyberattacks
Country
United States
Source
github.com
Date
20 March 2025
Drafted by
Raidu Incident Detection

What happened

The torch.nn.utils.rnn.unpack_sequence function in PyTorch 2.6.0 causes a segmentation fault when passed a PackedSequence with empty tensors.

The related pad_packed_sequence function exhibits the same crash behavior with empty data and batch sizes.

Reported impact

The segmentation fault causes a hard crash rather than a handled error, preventing graceful failure in applications using these functions with empty sequences.

Index analysis

The vulnerability stems from missing error checking for empty tensor inputs, allowing the functions to attempt operations on uninitialized or invalid memory.

Snyk reported the issue as high severity with a score of 8.2.

Classification

Organization
PyTorch (subject)
Category
Security and cyberattacks
Country
United States
Harm status
Potential harm
Intent
Unintentional
Timing
Unknown
Harmed
Consumers
AI systems
PyTorch
Regulations
GDPR (cited)

Sources and evidence

This record was researched and written by the Index, based on the following original reporting.

github.com
https://github.com/pytorch/pytorch/issues/149622
vuldb.com
https://vuldb.com/?id.302048
cve.org
NVD entry