MetaGPT deserialize_message() Pickle Deserialization RCE (CVE-2026-0760)#21062
MetaGPT deserialize_message() Pickle Deserialization RCE (CVE-2026-0760)#21062exploitintel wants to merge 2 commits intorapid7:masterfrom
Conversation
MetaGPT v0.8.1 and prior pass attacker-supplied bytes directly to pickle.loads() in deserialize_message() at metagpt/utils/serialize.py:75 with no validation or restricted unpickler. A single unauthenticated POST to /api/message/deserialize with a base64-encoded pickle payload executes arbitrary commands during deserialization, before any app-level checks run. The vendor did not respond to ZDI's 3+ month responsible disclosure period. Targets: Unix Command (ARCH_CMD) + Linux Dropper (CmdStager x86/x64) Tested against MetaGPT v0.8.1 / Debian GNU/Linux 12 (bookworm)
|
Thanks for your pull request! Before this can be merged, we need the following documentation for your module: |
|
Closing this PR. Same issue as #21068 — the module targets a custom Flask server (vuln_server.py) that wraps MetaGPT's deserialize_message() library function directly over HTTP. MetaGPT is a Python agent framework/library with no built-in HTTP API. The /api/message/deserialize endpoint and the health response with vulnerable=true only exist in our custom lab wrapper, not in any real MetaGPT deployment. Apologies for the noise. |
|
Apologies for the wasted review time. The CVE itself is legitimate, but we made the mistake of targeting a custom Flask wrapper we built around deserialize_message() rather than an actual MetaGPT deployment — which ships no HTTP server at all. Lesson learned: demonstrating a vulnerability and exploiting it in practice are two different things. |
Summary
pickle.loads()directly on attacker-supplied bytes indeserialize_message()atmetagpt/utils/serialize.py:75with no validation or restricted unpicklerPOST /api/message/deserializewith a base64-encoded pickle payload executes arbitrary OS commands during deserialization via the__reduce__protocol, before any application-level checks runVerification
Tested against MetaGPT v0.8.1 / Debian GNU/Linux 12 (bookworm) (Docker lab):
Module details
GLOBAL os.system+SHORT_BINUNICODEcommand +TUPLE1+REDUCE, base64-encoded for HTTP transport/healthendpoint forvulnerable=trueflagReferences