Junglewise Threat Intelligence

CVE-2025-2149: PyTorch improper initialization in Quantized Sigmoid Module

CVE-2025-2149 · Severity: medium · CVSS 4 · Published 2025-03-10

Technologies: torch (PyPI), PyTorch. Vendors: PyPI, PyTorch.

Executive brief

A vulnerability exists in PyTorch, a popular machine learning library, specifically within its quantized Sigmoid module used for optimizing model performance. When loading a saved model state, the system fails to correctly restore certain internal mathematical parameters (scale and zero_point), leading to improper initialization. This could result in unexpected model behavior or integrity issues if an attacker can influence the model loading process on a local system.

Technical details

An improper initialization vulnerability (CWE-665) exists in the `nnq_Sigmoid` function of PyTorch's Quantized Sigmoid Module. The issue occurs because quantization parameters (`scale` and `zero_point`) are not correctly restored when a `state_dict` is loaded into a newly initialized module that has different initial parameters. An attacker with local access could potentially exploit this to cause integrity issues in machine learning models. The attack complexity is high as it requires specific local conditions to manipulate the model loading process. As of the advisory date, no official patch has been confirmed in the provided references, though the issue is tracked in the PyTorch repository.

Affected products

  • PyTorch PyTorch <= 2.6.0

Timeline

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

References

Related threats