CVE-2025-46149: PyTorch: reachable assertion in nn.Fold with inductor

MEDIUM
Published September 25, 2025
CISO Take

PyTorch deployments using torch.compile() with the inductor backend and nn.Fold operations are vulnerable to a reachable assertion that may expose internal state information. Upgrade to PyTorch 2.7.0 immediately; if upgrading is not feasible short-term, avoid using inductor (torch.compile backend='inductor') in pipelines that include nn.Fold layers. Risk is elevated in externally-facing inference APIs where untrusted inputs can reach compiled model paths.

Risk Assessment

Medium risk with targeted exposure. CVSS 5.3 reflects network-reachable, zero-interaction exploitation with limited confidentiality impact (assertion failure may leak stack traces or internal tensor state). The low attack complexity and no-privilege requirement make this accessible to unsophisticated adversaries targeting public inference endpoints. Impact is bounded to information disclosure rather than full compromise, but in AI production environments, leaked tensor shapes and model internals can aid model extraction or adversarial crafting efforts.

Affected Systems

Package Ecosystem Vulnerable Range Patched
pytorch pip No patch
99.6K OpenSSF 6.4 21.7K dependents Pushed 6d ago 8% patched ~142d to patch Full package profile →

Do you use pytorch? You're affected.

Severity & Risk

CVSS 3.1
5.3 / 10
EPSS
0.0%
chance of exploitation in 30 days
Higher than 5% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Trivial

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C Low
I None
A None

Recommended Action

5 steps
  1. Patch: Upgrade PyTorch to >= 2.7.0 (fixes the assertion in inductor codegen).

  2. Workaround: Disable inductor for affected model components: torch.compile(model, backend='eager') or torch.compile(model, backend='aot_eager').

  3. Detection: Grep model code and dependencies for nn.Fold usage; check torch.__version__ < '2.7.0' in all serving containers.

  4. Runtime: Enable structured logging on inference endpoints to capture AssertionError tracebacks before they surface to callers — prevents info leakage while preserving diagnostics.

  5. Container hygiene: Rebuild base images with patched PyTorch; pin versions in requirements.txt/pyproject.toml.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 9 - Risk management system
ISO 42001
A.6.2.6 - AI system security
NIST AI RMF
MANAGE 2.2 - Mechanisms are in place to sustain AI risk management
OWASP LLM Top 10
LLM06:2025 - Sensitive Information Disclosure

Frequently Asked Questions

What is CVE-2025-46149?

PyTorch deployments using torch.compile() with the inductor backend and nn.Fold operations are vulnerable to a reachable assertion that may expose internal state information. Upgrade to PyTorch 2.7.0 immediately; if upgrading is not feasible short-term, avoid using inductor (torch.compile backend='inductor') in pipelines that include nn.Fold layers. Risk is elevated in externally-facing inference APIs where untrusted inputs can reach compiled model paths.

Is CVE-2025-46149 actively exploited?

No confirmed active exploitation of CVE-2025-46149 has been reported, but organizations should still patch proactively.

How to fix CVE-2025-46149?

1. Patch: Upgrade PyTorch to >= 2.7.0 (fixes the assertion in inductor codegen). 2. Workaround: Disable inductor for affected model components: torch.compile(model, backend='eager') or torch.compile(model, backend='aot_eager'). 3. Detection: Grep model code and dependencies for nn.Fold usage; check torch.__version__ < '2.7.0' in all serving containers. 4. Runtime: Enable structured logging on inference endpoints to capture AssertionError tracebacks before they surface to callers — prevents info leakage while preserving diagnostics. 5. Container hygiene: Rebuild base images with patched PyTorch; pin versions in requirements.txt/pyproject.toml.

What systems are affected by CVE-2025-46149?

This vulnerability affects the following AI/ML architecture patterns: model serving, training pipelines, image processing pipelines.

What is the CVSS score for CVE-2025-46149?

CVE-2025-46149 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.02%.

Technical Details

NVD Description

In PyTorch before 2.7.0, when inductor is used, nn.Fold has an assertion error.

Exploitation Scenario

An adversary probing an externally-facing image segmentation inference API (e.g., a SAM or vision transformer endpoint) sends inputs crafted to trigger the nn.Fold code path under inductor compilation. The reachable assertion fires, and the unhandled exception propagates a stack trace to the API response containing PyTorch version, internal tensor dimensions, and model architecture hints. The adversary uses this information to fingerprint the exact model architecture and PyTorch version, informing subsequent model extraction or adversarial example crafting attempts. No authentication is required; a single malformed request suffices.

Weaknesses (CWE)

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Timeline

Published
September 25, 2025
Last Modified
October 3, 2025
First Seen
September 25, 2025

Related Vulnerabilities