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.

What is the risk?

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.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
PyTorch pip No patch
100.9K OpenSSF 6.4 22.7K dependents Pushed 3d ago 11% patched ~216d to patch Full package profile →

Do you use PyTorch? You're affected.

How severe is it?

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

What is the 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

What should I do?

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.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

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

How is it classified?

Which compliance frameworks are affected?

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.34%.

What is the AI security impact?

Affected AI Architectures

model servingtraining pipelinesimage processing pipelines

MITRE ATLAS Techniques

AML.T0001 Search Open AI Vulnerability Analysis
AML.T0010.001 AI Software
AML.T0029 Denial of AI Service
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Art. 9
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.2
OWASP LLM Top 10: LLM06:2025

What are the technical details?

Original Advisory

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)

CWE-617 — Reachable Assertion: The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.

  • [Implementation] Make sensitive open/close operation non reachable by directly user-controlled data (e.g. open/close resources)
  • [Implementation] Perform input validation on user data.

Source: MITRE CWE corpus.

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