Triple-Stage AI Attack Chain Hits PyTorch
Black Hat Asia 2026 demo turns PyTorch TorchScript as_strided heap underflow into RCE even with weights_only=True, and shows it against OpenSearch.

Visual TL;DR
an attacker supplied torch checkpoint opened by a victim application
From the article 6 mentionsTwo independent researchers demoed a triple-stage AI attack chain at Black Hat Asia 2026 that turns a PyTorch model file into remote code execution even with weights_only set to True.
model file to memory corruption to remote code execution in three linked steps
From the articleTwo independent researchers demoed a triple-stage AI attack chain at Black Hat Asia 2026 that turns a PyTorch model file into remote code execution even with weights_only set to True.
researchers demonstrated the full chain against a live OpenSearch deployment on stage
mode docs called secure but still dispatches to torch.jit.load on TorchScript
From the article 5 mentionsThe researchers found torch.load with weights_only=True still calls torch.jit.load if the file is TorchScript format, and TorchScript exposes high-risk operators like torch.save and torch.from_file.
C++ memory safety underflow in the as_strided operator exposed to loading path
From the articleCalling the API directly in Python reproduced the bug, but saving it via forward into a TorchScript file and reloading with torch.load with weights_only True initially hid it.
an attacker supplied torch checkpoint opened by a victim application
From the article 6 mentionsTwo independent researchers demoed a triple-stage AI attack chain at Black Hat Asia 2026 that turns a PyTorch model file into remote code execution even with weights_only set to True.
mode docs called secure but still dispatches to torch.jit.load on TorchScript
From the article 5 mentionsThe researchers found torch.load with weights_only=True still calls torch.jit.load if the file is TorchScript format, and TorchScript exposes high-risk operators like torch.save and torch.from_file.
C++ memory safety underflow in the as_strided operator exposed to loading path
From the articleCalling the API directly in Python reproduced the bug, but saving it via forward into a TorchScript file and reloading with torch.load with weights_only True initially hid it.
attacker controls arbitrary read and write over process memory via crafted strides
From the articleA second check rejects storage_offset less than zero, which is why minus 1 fails but 2^62 minus 1 succeeds and returns 0x41, the glibc heap chunk header, confirming an underflow.
model file to memory corruption to remote code execution in three linked steps
From the articleTwo independent researchers demoed a triple-stage AI attack chain at Black Hat Asia 2026 that turns a PyTorch model file into remote code execution even with weights_only set to True.
model serialization changes broke the researchers first weaponized proof of concept
researchers pivoted from pickle RCE to native code execution through the underflow primitive
researchers demonstrated the full chain against a live OpenSearch deployment on stage
Contents(8)
© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Watch
The videos behind the news, one flip at a time
The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.
Written by
Daniel SingerEditor, StartupHub.ai
Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.


