XMPP Stanza Smuggling or How I Hacked Zoom
Examines XMPP Stanza Smuggling or methods to Hacked Zoom and evaluates key implications for security practitioners.
Summary
Overview: Ivan Fratric of Google Project Zero introduces XMPP Stanza Smuggling, a novel class of vulnerabilities affecting implementations of the Extensible Messaging and Presence Protocol (XMPP). Highlighting XMPP's widespread adoption in modern collaborative platforms, video conferencing applications like Zoom, online games, and industrial control systems, the researcher demonstrates how subtle discrepancies between XML parsers allow arbitrary stanza injection. By exploiting parser differentials between clients and servers, an attacker can smuggle unauthorized control stanzas directly past server validation to achieve zero-click exploitation.
Key Topics: - Architecture of XMPP streams, message stanzas, and IQ control stanzas - XMPP Stanza Smuggling mechanics via custom XML tag injection - Server and client parser differentials (Zoom client gloox vs. ejabberd/fast_xml/expat) - Exploitation vectors leveraging character encoding quirks and UTF-8 handling
Technical Details: XMPP operates by exchanging XML snippets—known as stanzas—over continuous XML streams established between clients and servers. The protocol distinguishes between standard data-carrying <message> stanzas exchanged between end users and Info/Query (<iq>) stanzas, which serve as high-privilege control messages exchanged between the client and the central server infrastructure. In a typical messaging flow, a client transmits a stanza to the server, which parses the XML structure, processes routing logic, serializes the object model back into text, and transmits the payload over a stream connection to the destination client's parser.
Fratric discovered that many XMPP server implementations permit clients to embed custom, arbitrary XML tags inside user-controlled message stanzas, provided the nested XML remains well-formed from the server's perspective. Stanza Smuggling occurs when an attacker crafts custom XML containing nested or ambiguous stanza definitions that the server interprets as a single, harmless <message> stanza, but which the recipient client deserializes as multiple distinct stanzas. By smuggling an unauthorized <iq> stanza into the receiving client's stream, an attacker can invoke privileged client actions, spoof administrative communications, or trigger client-side vulnerabilities without server-side authorization.
Analyzing Zoom's messaging architecture as a high-impact case study, the researcher reverse-engineered the client-server interaction by examining Zoom recruitment listings, which revealed an Erlang-based backend. Zoom deployed an ejabberd server running the fast_xml Erlang module backed by the C-based expat XML parser, while the Zoom desktop client integrated the gloox C++ open-source XMPP library with its own proprietary XML parser. The differing architectural implementations created systemic parser differentials, serializer/deserializer mismatches, and parsing anomalies involving UTF-8 byte boundary handling. These discrepancies allowed specially crafted multi-byte UTF-8 sequences and malformed entities to pass through expat validation while causing gloox to prematurely terminate the enclosing stanza and process subsequent smuggled payloads as independent commands.
Key Takeaways: Developers implementing XMPP and XML-based streaming protocols must ensure strict semantic parity between client and server XML parsers or enforce a single, unified parser implementation across the entire architecture. XMPP servers must strictly sanitize or reject unauthorized custom XML elements within client stanzas rather than serializing raw markup directly to peers. Security teams should audit multi-parser environments for encoding and serialization discrepancies that permit message boundary desynchronization and protocol smuggling.
(AI summary — Gemini Flash)
Related talks
Black Hat USA 2022·37 min
Presents leveraging the Apple ESF for Behavioral Detections and evaluates key implications for security practitioners.
Black Hat USA 2022·43 min
Hash Table
Provides lets Dance in the Cache - Destabilizing Hash Table on Microsoft IIS and evaluates key implications for security practitioners.
Black Hat USA 2022·27 min
Evaluates is WebAssembly Really Safe? -- Wasm VM Escape and RCE Vulnerabilities Have Been Found in New Way and evaluates key implications for security practitioners.


