(0Day) Hugging Face Transformers GLM4 Deserialization of Untrusted Data Remote Code Execution Vulnerability
The GLM4 model loader in Hugging Face Transformers deserialises weight files without validating their contents, so a malicious model file can run arbitrary code. An attacker could achieve code execution if a user loads such a file.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Hugging Face Transformers. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the model weight parser deserialises untrusted data without validating it before reconstruction.
Impact
An attacker could execute arbitrary code in the context of the current process, but the target must visit a malicious page or open a malicious file.
What the attacker needed
Victim opens a malicious model file; user interaction required
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program loads a saved model, it may use a format that can also carry instructions for the computer, not just numbers. If those instructions are not checked, opening a file from an untrusted source can let someone else run their own code on your machine. This report says the model loader did not check the file properly.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.