LlamaIndex has Incomplete Documentation of Program Execution related to JsonPickleSerializer component
The JsonPickleSerializer component in LlamaIndex falls back to Python's pickle module when deserialising data, which can execute arbitrary code. An attacker who supplies untrusted serialised data could achieve remote code execution and full system compromise.
run-llama/llama_index
Originally disclosed on huntr
Incomplete Documentation of Program Execution exists in the run-llama/llama_index library's JsonPickleSerializer component, affecting versions v0.12.27 through v0.12.40. This vulnerability allows remote code execution due to an insecure fallback to Python's pickle module. JsonPickleSerializer prioritizes deserialization using pickle.loads(), which can execute arbitrary code when processing untrusted data. Attackers can exploit this by crafting malicious payloads to achieve full system compromise. The root cause involves the use of an insecure fallback strategy without sufficient input validation or protective safeguards. Version 0.12.41 renames JsonPickleSerializer to PickleSerializer and adds a warning to the docs to only use PickleSerializer to deserialize safe things.
From the GitHub Advisory Database (GHSA-m84c-4c34-28gf, CC BY 4.0).
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
The component used Python's pickle module as an insecure fallback for deserialisation without sufficient input validation or protective safeguards.
Impact
An attacker could craft malicious payloads to execute arbitrary code and achieve full system compromise.
What the attacker needed
Ability to supply untrusted serialised data
The fix
Version 0.12.41 renamed the component to PickleSerializer and added a documentation warning to only use it for deserialising safe things.
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.
Serialisation turns program data into a format that can be saved or sent, and deserialisation turns it back. Python's pickle format is dangerous because loading it can run code hidden inside the data. Here, a library component used pickle as a fallback, so anyone who could feed it malicious data could run their own commands on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.