# CVE-2025-2148: PyTorch memory corruption in profiler Tuple Handler

Source: https://junglewise.ai/threats/cve-2025-2148-pytorch-memory-corruption-in-profiler-tuple-handler  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-03-10. Updated: 2026-06-09  
License: CC BY 4.0 with a link back

CVE-2025-2148 · Severity: medium · CVSS 5 · Published 2025-03-10

PyTorch, a popular machine learning framework, is vulnerable to a memory corruption issue when processing specific inputs in its profiling component. An attacker could potentially cause the application to crash or behave unpredictably by providing a malformed 'None' argument to a specific internal function. This could lead to service disruptions or impact the reliability of machine learning operations.

Technologies: [torch (PyPI)](https://junglewise.ai/threats/technologies/torch). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-2148 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-2148 being exploited in the wild.

**How severe is CVE-2025-2148?** Medium severity, with a CVSS score of 5, published 10 March 2025.

**Which products and versions are affected?** torch (PyPI) <= 2.6.0, ECOSYSTEM:introduced=0,last_affected=2.6.0, ECOSYSTEM:introduced=0,last_affected=2.6.0-cu124.

**Is there a fix for CVE-2025-2148?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2025-2148 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-2148?** Check whether you run torch (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A memory corruption vulnerability (CWE-119) exists in PyTorch versions up to and including 2.6.0. The flaw is located within the 'Tuple Handler' component, specifically in the torch.ops.profiler._call_end_callbacks_on_jit_fut function. When this function is invoked with a 'None' argument instead of the expected tuple, it triggers a segmentation fault due to improper handling of the null/None value. While the attack vector is listed as network-reachable, exploitation is considered difficult and requires high attack complexity, typically involving a user interacting with a malicious script or input that triggers the vulnerable profiler operation. Successful exploitation results in a crash (denial of service) and potentially limited memory corruption.

## Affected products

- PyTorch PyTorch <= 2.6.0

## Identifiers

- CVE-2025-2148
- GHSA-c678-jfcj-6jmf
- PYSEC-2025-189

## Timeline

- 2025-02-24: disclosed: Issue reported on GitHub repository
- 2025-03-10: advisory: GitHub Advisory and NVD entry published

## References

- [https://github.com/pytorch/pytorch/issues/147722](https://github.com/pytorch/pytorch/issues/147722)
- [https://vuldb.com/?ctiid.299059](https://vuldb.com/?ctiid.299059)
- [https://vuldb.com/?id.299059](https://vuldb.com/?id.299059)
- [https://vuldb.com/?submit.505959](https://vuldb.com/?submit.505959)
- [https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2025-189.yaml](https://github.com/pypa/advisory-database/tree/main/vulns/torch/PYSEC-2025-189.yaml)

## Related threats

- [PYSEC-2026-1970 - PyTorch Improper Resource Shutdown or Release vulnerability](https://junglewise.ai/threats/cve-2025-3730-pytorch-improper-resource-shutdown-or-release-vulnerability)
- [PYSEC-2026-139 - A vulnerability was identified in PyTorch 2.10.0. The affected element is an unknown function of the…](https://junglewise.ai/threats/cve-2026-4538-pysec-2026-139-a-vulnerability-was-identified-in-pytorch-2-10-0)
- [PyTorch arbitrary code execution in weights_only unpickler](https://junglewise.ai/threats/cve-2026-24747-pytorch-arbitrary-code-execution-in-weights-only-unpickler)
- [PyTorch denial of service in torch.profiler.profile](https://junglewise.ai/threats/cve-2025-63396-pytorch-denial-of-service-in-torch-profiler-profile)
- [PYSEC-2025-209 - An issue in pytorch v2.7.0 can lead to a Denial of Service (DoS) when a PyTorch model consists of torch.Tensor.to_sparse() and torch.Tensor.](https://junglewise.ai/threats/cve-2025-55560-pysec-2025-209-an-issue-in-pytorch-v2-7-0-can-lead-to-a-denial-of)
