CVE-2025-2149: PyTorch Quantized Sigmoid Module Improper Initialization Vulnerability
Summary
CVE-2025-2149: PyTorch Quantized Sigmoid Module nnq_Sigmoid initialization. Affects pytorch versions >= 2.6.0, < 2.7.0. Fixed in 2.7.0. How to fix ↓
Also tracked for
The same CVE-2025-2149 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
PyTorch is an open-source machine learning library widely used for applications such as computer vision and natural language processing. It provides a flexible and dynamic computational graph, enabling developers to build complex neural networks easily. The library includes various modules, including quantized versions of standard operations to optimize performance on specific hardware. However, a vulnerability has been identified in the nnq_Sigmoid function of the Quantized Sigmoid Module, affecting versions 2.6.0 and later.
Vulnerability Detail
A vulnerability was discovered in PyTorch 2.6.0+cu124, specifically in the nnq_Sigmoid function of the Quantized Sigmoid Module. This issue arises from improper initialization due to manipulation of the scale and zero_point arguments. The vulnerability is rated as problematic, with a high complexity for exploitation, making it difficult to execute. The attack must be performed locally, and while the exploit has been disclosed, it requires significant technical knowledge to leverage effectively.
How To Fix
Minimum fixed version
2.7.0
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, users can avoid using the nnq_Sigmoid function until they can update to the patched version. Alternatively, ensure that the scale and zero_point arguments are set to safe values that do not lead to improper initialization.
Conclusion
The CVE-2025-2149 vulnerability in PyTorch's nnq_Sigmoid function poses a significant risk due to improper initialization. Users are advised to update to version 2.7.0 or later to mitigate this issue. For those unable to update immediately, workarounds are available to minimize risk.
See every vulnerability recorded for pytorch →
FAQ
CVE-2025-2149 is a vulnerability in the PyTorch library that affects the nnq_Sigmoid function, leading to improper initialization due to manipulation of specific arguments.
The vulnerability affects PyTorch versions 2.6.0 and later, specifically those built with CUDA 124.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By using the Vulert playground, you can check if your application is affected without needing to sign up.
If an immediate update is not possible, avoid using the nnq_Sigmoid function and ensure safe values for the scale and zero_point arguments.
No, the exploitation of this vulnerability is considered difficult due to the high complexity of the attack and the requirement for local access.
References
Related vulnerabilities
Recent vulnerabilities recorded for pytorch.