Research Library · Idea
Gadget chains
A gadget chain is a sequence of existing code fragments in an application or its dependencies that, when linked during object reconstruction, produces an unintended and harmful result. Gadget chains matter in insecure deserialization, where untrusted data decides which types a program instantiates. The OWASP Deserialization Cheat Sheet notes that a deserializer can only instantiate types it knows about 1.
The cheat sheet lists known .NET classes that have been abused as gadgets. It also notes that allowed types can still be risky. It warns that native deserialization features can be repurposed for denial of service, access control bypass or remote code execution, and that Python's pickle can execute arbitrary code when it loads untrusted data 1.
The recommended defences are to avoid native serialization formats in favour of data-only formats such as JSON, and to deserialize only data whose signature has been verified. Developers should use allowlists of permitted types, for example Java serialization filters. They should avoid BinaryFormatter, which Microsoft says cannot be secured, and keep gadget-prone code separate from internet-facing code 1.
Source · Deserialization Cheat Sheet (opens in a new tab) · OWASP Cheat Sheet Series
References
- Deserialization Cheat Sheet (opens in a new tab) · OWASP Cheat Sheet Series ↩ ↩ ↩
Research articles
- From bug to shell: what "remote code execution" means, the weaknesses behind it, and how a flaw becomes an exploited one · Software security
In the news
- Critical vBulletin Flaw Allows Remote Code Execution Without Login · Security Affairs ·
- Drupal core - Moderately critical - Gadget chain - SA-CORE-2026-018 · Drupal security advisories (core) ·
- Drupal core - Moderately critical - Gadget chain - SA-CORE-2026-006 · Drupal security advisories (core) ·
- Drupal core - Moderately critical - Gadget Chain - SA-CORE-2026-002 · Drupal security advisories (core) ·
See what connects to it on the map of ideas →

SecSIG