Deserialisation: when data turns into code
Insecure deserialisation · facts checked 2026-10-03
The facts
- Deserialisation of untrusted data is tracked as CWE-502. (MITRE)
- MITRE describes CWE-502 as an application deserialising untrusted data without sufficiently checking that the result will be valid. (MITRE)
- Deserialisation of untrusted data ranked fifteenth in MITRE's 2025 CWE Top 25 Most Dangerous Software Weaknesses, published in December 2025. (MITRE)
- The OWASP Top 10 for 2021 groups insecure deserialisation under software and data integrity failures. (OWASP)
The panel
Jordan Pike AI host
MITRE tracks deserialisation of untrusted data as CWE-502. MITRE describes it as an application deserialising untrusted data without sufficiently checking that the result will be valid.
Jordan Pike AI host
MITRE ranked it fifteenth in its 2025 CWE Top 25 Most Dangerous Software Weaknesses, published in December 2025. And the OWASP Top 10 for 2021 groups insecure deserialisation under software and data integrity failures.
Jordan Pike AI host
So if you run or build software that passes data between systems, this one is for you. Dex, how does an attacker see it?
Dex Moreno AI analyst
Think of it as a parcel the application agrees to unpack without looking at the label. Serialised data is a flattened object, and when the app rebuilds it, it's trusting that the sender only described something harmless. If an attacker can supply that data, they may be able to steer what the app builds and what it does while building it. Where that data comes from matters: anything that crosses a trust boundary is a candidate.
Dex Moreno AI analyst
What does the attacker hold afterwards? Potentially code running as the application's own service account. That's a classic foothold: the database it talks to, the secrets it keeps, the directory it's integrated with, and whatever downstream systems trust it. The app was only supposed to read a blob, and now it's a stepping stone. Honestly, a very tidy trick. Seven out of ten for elegance. The target deserved better, obviously.
Jordan Pike AI host
Dex, we are not rating it out of ten.
Maya Okafor AI analyst
The bug class is a trust error. Serialising turns an object into bytes, and deserialising turns the bytes back into an object. The trouble is that the bytes help decide what gets built, and MITRE's wording says it exactly: the app doesn't sufficiently check that the result is valid. Validation arrives after the damage, if it arrives at all. That's why OWASP files it under integrity failures: the app can't prove the data is what it expects, or who made it.
Maya Okafor AI analyst
Adding this one to my tally of bug classes that should have died in two thousand four. It's still ranked in a Top 25 list, so apparently nobody told it.
Maya Okafor AI analyst
A complete fix means not deserialising untrusted data into rich objects at all. Use a plain data format with a strict schema, allow only the types you expect, and verify integrity before parsing, so tampered data is rejected up front. A partial fix is a blocklist of known-bad types, which attackers tend to walk around. Then check the siblings: sessions, caches, message queues, anything where data leaves your control and comes back.
Dex Moreno AI analyst
I'll push back on one thing. Fixing the code is right, but it isn't the end. If this flaw was ever reachable, assume someone may already have a foothold and go looking: odd child processes from the app, unexpected outbound connections, service-account activity that doesn't fit. And if one of these ever lands on a known-exploited list on something internet-facing, treat it as an emergency.
Maya Okafor AI analyst
Agreed on hunting, but a compensating control like a filter is a bridge, not a fix. Give it an end date, and get the root cause fixed, or it comes back.
Jordan Pike AI host
So: Monday morning? Inventory where your applications deserialise data they didn't create. Prefer plain formats with strict schemas, verify integrity before parsing, and if you find exposure, hunt for a foothold as well as fixing the code.





