We R in a Right Pickle With All These Insecure Serialization Formats

No ratings

Presented at Black Hat USA 2024

The term pickle has become synonymous with insecurity in the modern python community and yet it remains one of the most prevalent serialization formats in the python ecosystem. However, pickle, despite its wide use, has been talked to death. In this talk, we will take a step back and look at the root problem, the use of bytecode driven serialization formats. We'll dissect both pickle and RDS, R's serialization format, giving a never before seen deep dive into the R language's main serialization format. During this process, we will show the audience the inherent insecurity of any deserialization that allows code to be run, even when it has security checks on it. Specifically, we will showcase this by revealing a critical code execution vulnerability in the RDS format which allows attackers to create large supply chain attacks or target any R user directly. Finally, we will release two tools for people to write their own exploits, detect exploits, and reverse engineer the pickle and RDS formats.