{"id":"CVE-2024-3568","aliases":["EUVD-2024-1077","GHSA-37q5-v5qm-c9v8","PYSEC-2026-1978"],"status":"published","title":"Arbitrary Code Execution via Deserialization in huggingface/transformers","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","severity":{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.02084,"percentile":0.81807,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-502"],"published":"2024-04-10T17:07:55Z","modified":"2026-10-28T02:30:45Z","exploits":[{"source":"pocgithub","id":"rooobeam/Pickle-Deserialization-Exploit-in-Transformers","title":"rooobeam/Pickle-Deserialization-Exploit-in-Transformers","date":"2025-07-10","url":"https://github.com/rooobeam/Pickle-Deserialization-Exploit-in-Transformers"}],"fixes":[{"ecosystem":"PyPI","package":"transformers","fixed_in":["4.38.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"transformers","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.38.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"transformers","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.38.0"}]}],"versions":["0.1","2.0.0","2.1.0","2.1.1","2.10.0","2.11.0","2.2.0","2.2.1","2.2.2","2.3.0","2.4.0","2.4.1","2.5.0","2.5.1","2.6.0","2.7.0","2.8.0","2.9.0","2.9.1","3.0.0","3.0.1","3.0.2","3.1.0","3.2.0","3.3.0","3.3.1","3.4.0","3.5.0","3.5.1","4.0.0","4.0.0rc1","4.0.1","4.1.0","4.1.1","4.10.0","4.10.1","4.10.2","4.10.3","4.11.0","4.11.1","4.11.2","4.11.3","4.12.0","4.12.1","4.12.2","4.12.3","4.12.4","4.12.5","4.13.0","4.14.0","4.14.1","4.15.0","4.16.0","4.16.1","4.16.2","4.17.0","4.18.0","4.19.0","4.19.1","4.19.2","4.19.3","4.19.4","4.2.0","4.2.1","4.2.2","4.20.0","4.20.1","4.21.0","4.21.1","4.21.2","4.21.3","4.22.0","4.22.1","4.22.2","4.23.0","4.23.1","4.24.0","4.25.0","4.25.1","4.26.0","4.26.1","4.27.0","4.27.1","4.27.2","4.27.3","4.27.4","4.28.0","4.28.1","4.29.0","4.29.1","4.29.2","4.3.0","4.3.0rc1","4.3.1","4.3.2","4.3.3","4.30.0","4.30.1","4.30.2","4.31.0","4.32.0","4.32.1","4.33.0","4.33.1","4.33.2","4.33.3","4.34.0","4.34.1","4.35.0","4.35.1","4.35.2","4.36.0","4.36.1","4.36.2","4.37.0","4.37.1","4.37.2","4.4.0","4.4.1","4.4.2","4.5.0","4.5.1","4.6.0","4.6.1","4.7.0","4.8.0","4.8.1","4.8.2","4.9.0","4.9.1","4.9.2"]},{"source":"osv","ecosystem":"PyPI","package":"transformers","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.38.0"}]}],"versions":["0.1","2.0.0","2.1.0","2.1.1","2.10.0","2.11.0","2.2.0","2.2.1","2.2.2","2.3.0","2.4.0","2.4.1","2.5.0","2.5.1","2.6.0","2.7.0","2.8.0","2.9.0","2.9.1","3.0.0","3.0.1","3.0.2","3.1.0","3.2.0","3.3.0","3.3.1","3.4.0","3.5.0","3.5.1","4.0.0","4.0.0rc1","4.0.1","4.1.0","4.1.1","4.10.0","4.10.1","4.10.2","4.10.3","4.11.0","4.11.1","4.11.2","4.11.3","4.12.0","4.12.1","4.12.2","4.12.3","4.12.4","4.12.5","4.13.0","4.14.0","4.14.1","4.15.0","4.16.0","4.16.1","4.16.2","4.17.0","4.18.0","4.19.0","4.19.1","4.19.2","4.19.3","4.19.4","4.2.0","4.2.1","4.2.2","4.20.0","4.20.1","4.21.0","4.21.1","4.21.2","4.21.3","4.22.0","4.22.1","4.22.2","4.23.0","4.23.1","4.24.0","4.25.0","4.25.1","4.26.0","4.26.1","4.27.0","4.27.1","4.27.2","4.27.3","4.27.4","4.28.0","4.28.1","4.29.0","4.29.1","4.29.2","4.3.0","4.3.0rc1","4.3.1","4.3.2","4.3.3","4.30.0","4.30.1","4.30.2","4.31.0","4.32.0","4.32.1","4.33.0","4.33.1","4.33.2","4.33.3","4.34.0","4.34.1","4.35.0","4.35.1","4.35.2","4.36.0","4.36.1","4.36.2","4.37.0","4.37.1","4.37.2","4.4.0","4.4.1","4.4.2","4.5.0","4.5.1","4.6.0","4.6.1","4.7.0","4.8.0","4.8.1","4.8.2","4.9.0","4.9.1","4.9.2"]}],"products":[{"vendor":"huggingface","product":"huggingface/transformers"},{"vendor":"huggingface","product":"transformers"}],"references":[{"url":"https://huntr.com/bounties/b3c36992-5264-4d7f-9906-a996efafba8f","tags":["x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://github.com/huggingface/transformers/commit/693667b8ac8138b83f8adb6522ddaf42fa07c125","tags":["x_transferred","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-3568","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-37q5-v5qm-c9v8","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/3xxx/CVE-2024-3568.json","tags":["advisory"]},{"url":"https://github.com/huggingface/transformers","tags":["package"]},{"url":"https://pypi.org/project/transformers","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-3568","title":"Arbitrary Code Execution via Deserialization in huggingface/transformers","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","status":"published","published":"2024-04-10T17:07:55.667Z","modified":"2024-08-01T20:12:07.859Z","cvss":[{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low","assessor":"cna"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:34:10.613319Z"}],"euvd":[{"id":"EUVD-2024-1077","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","status":"published","published":"2024-04-10T17:07:55Z","modified":"2024-08-01T20:12:07Z","cvss":[{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low"}],"updated_at":"2026-11-03T03:50:39.0087Z"}],"ghsa":[{"id":"GHSA-37q5-v5qm-c9v8","title":"Transformers Deserialization of Untrusted Data vulnerability","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","status":"published","published":"2024-04-10T18:30:48Z","modified":"2024-04-10T22:20:57Z","cvss":[{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:37:42.744468Z"}],"nvd":[{"id":"CVE-2024-3568","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","status":"published","published":"2024-04-10T17:15:58.16Z","modified":"2026-06-17T07:44:32.02Z","cvss":[{"version":"3.1","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low","assessor":"secondary"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T14:09:49.255123Z"}],"osv":[{"id":"CVE-2024-3568","title":"Arbitrary Code Execution via Deserialization in huggingface/transformers","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","status":"published","published":"2024-04-10T17:07:55.667Z","modified":"2026-10-28T02:30:45.153604391Z","cvss":[{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T15:44:40.704083Z"},{"id":"GHSA-37q5-v5qm-c9v8","title":"Transformers Deserialization of Untrusted Data vulnerability","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","status":"published","published":"2024-04-10T18:30:48Z","modified":"2026-07-07T17:57:35.307551708Z","cvss":[{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low"}],"cwes":["CWE-502"],"updated_at":"2026-11-02T15:46:35.406455Z"},{"id":"PYSEC-2026-1978","title":"Transformers Deserialization of Untrusted Data vulnerability","description":"The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data within the `load_repo_checkpoint()` function of the `TFPreTrainedModel()` class. Attackers can execute arbitrary code and commands by crafting a malicious serialized payload, exploiting the use of `pickle.load()` on data from potentially untrusted sources. This vulnerability allows for remote code execution (RCE) by deceiving victims into loading a seemingly harmless checkpoint during a normal training process, thereby enabling attackers to execute arbitrary code on the targeted machine.","status":"published","published":"2026-07-07T11:45:37.939935Z","modified":"2026-07-07T17:48:11.555304072Z","cvss":[{"version":"3.0","score":3.4,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:N/A:L","level":"low"}],"updated_at":"2026-11-02T15:52:55.537808Z"}]}}
