Skip to content
Heist/ feed
Back to feed
Medium

PyTorch torch.nn.utils.rnn.pad_packed_sequence memory corruption

Type: advisorySources: OSV

A vulnerability was found in PyTorch 2.6.0. It has been declared as critical. Affected by this vulnerability is the function torch.nn.utils.rnn.pad_packed_sequence. The manipulation leads to memory corruption. Local access is required to approach this attack. The exploit has been disclosed to the public and may be used.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-2998
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 01:43 UTC · Revision 1

Source evidence

PyTorch torch.nn.utils.rnn.pad_packed_sequence memory corruption

core-osv · Original source

Published 31 Mar 2025, 14:00 UTC

A vulnerability was found in PyTorch 2.6.0. It has been declared as critical. Affected by this vulnerability is the function torch.nn.utils.rnn.pad_packed_sequence. The manipulation leads to memory corruption. Local access is required to approach this attack. The exploit has been disclosed to the public and may be used.

osv:CVE-2025-2998
Complete source record
{
  "id": "66ed4b15e1bd8a83d52588e8b51500bffcee4c788f7b28db8a89ce413facefca",
  "url": "https://osv.dev/vulnerability/CVE-2025-2998",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "PyTorch torch.nn.utils.rnn.pad_packed_sequence memory corruption",
    "summary": "A vulnerability was found in PyTorch 2.6.0. It has been declared as critical. Affected by this vulnerability is the function torch.nn.utils.rnn.pad_packed_sequence. The manipulation leads to memory corruption. Local access is required to approach this attack. The exploit has been disclosed to the public and may be used.",
    "evidence": "osv:CVE-2025-2998",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-2998",
      "aliases": [
        "BIT-pytorch-2025-2998",
        "CVE-2025-2998",
        "GHSA-f4hp-rmr7-r7v8",
        "PYSEC-2025-192"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pytorch/pytorch",
              "type": "GIT",
              "events": [
                {
                  "introduced": "1eba9b3aa3c43f86f4a2c807ac8e12c4a7767340"
                },
                {
                  "last_affected": "1eba9b3aa3c43f86f4a2c807ac8e12c4a7767340"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "2.6.0"
                      },
                      {
                        "last_affected": "2.6.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "cpe": "cpe:2.3:a:linuxfoundation:pytorch:2.6.0:-:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "2.6.0-NA"
                      },
                      {
                        "last_affected": "2.6.0-NA"
                      }
                    ],
                    "source": "CPE_STRING"
                  }
                ]
              }
            }
          ],
          "versions": [
            "2.6.0",
            "2.6.0-NA",
            "v2.6.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-2998.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.391958890Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/2xxx/CVE-2025-2998.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-2998",
        "https://vuldb.com/?id.302047",
        "https://vuldb.com/?submit.524151",
        "https://github.com/pytorch/pytorch/issues/149622",
        "https://github.com/pytorch/pytorch/issues/149622#issue-2935495265",
        "https://vuldb.com/?ctiid.302047"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-119"
        ],
        "cna_assigner": "VulDB",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/2xxx/CVE-2025-2998.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-2998",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 499476,
  "published_at": "2025-03-31T14:00:12.169+00:00"
}