Skip to content
DoS Disclosed report Intermediate

Uncontrolled Resource Consumption with XMPP-Layer Compression

Several XMPP server implementations that support application-layer compression do not limit the resources used when decompressing XMPP stanzas. A remote attacker can send a highly compressed XML element (an 'xmppbomb') to cause a denial of service by exhausting CPU and memory.

gianko Follow

Originally disclosed on HackerOne

Bounty$500 View original
  • Fixed in 16 days
  • Paid in 16 days
  • Disclosed after 16 days

The bug information described below is based on a publicly available security notice here http://xmpp.org/resources/security-notices/uncontrolled-resource-consumption-with-highly-compressed-xmpp-stanzas/

These discoveries are part of the results of my research activities.

OVERVIEW

Several XMPP server implementations that support application-layer compression (XEP-0138) suffer from an uncontrolled resource consumption vulnerability (CWE-400). This vulnerability can be remotely exploited by attackers to mount Denial-of-Service attacks by sending highly-compressed XML elements over XMPP streams.

In addition to that, the XMPP Standards Foundation committed into changing the XEP-0138 in or

DESCRIPTION

XMPP stream compression is a desirable feature that reduces the amount of data transferred between the protocol principals. In XMPP, compression can be negotiated at the TLS layer (as described in RFC 6120) or at the application layer (as described in XEP-0138). The vulnerability that has been discovered applies specifically to application-layer compression; such compression is negotiated between an XMPP client and server (or two servers). After a successful negotiation, all the protocol messages are compressed.

When decompressing XMPP stanzas, an XMPP server must limit the resources allocated to this task. If the server fails to do that, it can monopolize the CPU usage and allocate all the available memory. As a result, remote attackers can exploit this vulnerability to mount a Denial of Service attack (DoS) by submitting highly-compressed XML elements over an XMPP stream (we call these “xmppbombs” for short).

An “xmppbomb” is a valid XML element sent over an XML stream but containing a huge number of white spaces. See for example the following element sent during stream negotiation:

<?xml version='1.0' ?>

<stream:stream $SPACES to='$SERVER' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'> where $SPACES is a 4GB long string of spaces and $SERVER is the server domain name. By using the zlib compression algorithm, it is possible to compress the above message to 4MB (compression ratio of ~1:1000).

XEP-0170 on “Recommended Order of Stream Feature Negotiation” suggests to negotiate stream compression after the authentication of the principals. This suggests that xmppbombs can be used only after the user authentication. However, it has been reported that some implementations allow the use of compression before the authentication phase therefore opening up this vulnerability to unknown attackers.

IMPACT

Affected servers are reported to:

  1. Consume the virtual memory; in certain cases, it has been reported that servers are terminated by the operating system for out of memory conditions;
  2. Monopolize the use of the CPU;
  3. In certain cases, not allow administrators to disable stream compression.

SOLUTION

It is best to upgrade to corrected server code. An alternative, temporary workaround is to disable XMPP-level compression.

PROOFS OF CONCEPT

Two proofs of concept are available here http://trouge.net/misc/xmppbomb_exploit.tar.bz2 (don't worry, no zipbombs here :) ). Please refer to the README file for more information.

It contains two attacks: #1 before the principal authentication and #2 after. I used these two attacks to confirm the vulnerability on 3 implementations: Prosody 0.9.3, Openfire 3.9.1, and Tigase server 5.2.0. The vulnerability and the DoS has been monitored in a black-box settings by monitoring the resources consumed (i.e., CPU usage, RSS/VSZ memory, and disk I/O). In addition, we measured the availability of the XMPP server under test as the number of (honest) requests processed per second during the attack and compared when not under attack.

The code and the explanation below has been shared with the XMPP community (vendors and admin).

The list of affected vendors can be found here http://xmpp.org/resources/security-notices/uncontrolled-resource-consumption-with-highly-compressed-xmpp-stanzas/

PRELIMINARIES

xmppbombs can be generated with XMPPBombGen.java. In all our tests, we used xmppbombs of the size of 4MB that amounts to 4GB of uncompressed XMPP message each.

ATTACK #1: xmppbomb before authentication

An example of this attack is in XMPPBombNoAuth.java. The attack is the following:

  1. the attacker prepares offline a xmppbomb

  2. the attacker then starts the XMPP protocol with the target by sending:

<?xml version='1.0'?><stream:stream to='server' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
  1. afterwards, the attacker requests to enable on the DEFLATE compression:

<compress xmlns='http://jabber.org/protocol/compress'><method>zlib</method></compress>

  1. finally, the attacker sends the xmppbomb

The steps 2-4 can be executed concurrently (e.g., by colluded attackers, or with a botnet).

We found out that Prosody and Openfire are vulnerable to this attack. Prosody allocates up to 7GB of physical memory (RSS memory) with a single xmppbomb with 4GB of payload. The process is finally killed by the kernel due to an out of memory. Openfire uses instead 100% of the CPU and a bit less memory than Prosody (3GB) plus it writes to disk about 400 MB of data. We monitored delays on the availability of the service from x100 times to x10000 with parallel xmppbombs (12 or 24 parallel bombs).

ATTACK #2: xmppbomb after authentication:

An example of this attack is in XMPPBombAuth.java. The attack is the following:

  1. the attacker prepares offline an xmppbomb

  2. the attacker then starts the XMPP protocol (see step 2 in Attack #1)

  3. the attacker logs in:

<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN' client-uses-full-bind-result='true'>$TOKEN</auth>

where $TOKEN is the base 64 of the user name and password.

The attack then continues with step 3 and 4 of the attack #1.

Tigase is vulnerable to this attack and one 4GB xmppbomb pushes the CPU usage up to 100% for about 10 minutes.

OTHER RELEVANT INFORMATION

During the coordination process, I suggested the XMPP community to review the specifications. This is part of my suggestions :

" [...] I think that also the specs may warn developers on the risk of DoS via xmppbombs. The points 4 and 6 of Section 13.12 of RFC 6120 are SHOULDs rather than MUSTs and they refer only to uncompressed data. Then, XEP-0138 doesn't mention any XMPP-specific security consideration and it refers to the security consideration of TLS (See https://tools.ietf.org/html/rfc3749#page-5) that addresses (1) a binary-oriented protocol (2) concerns when combining compression and encryption and (3) risk of data size expansion. I think that this left a grey area in which developers took different decisions leading to these vulnerabilities. IMHO, XEP-0138 should be amended with a subsection inside Section 7 saying that if points 4 and 6 of Section 13.12 of RFC 6120 are not implemented then the implementation may be vulnerable to DoS via xmppbombs. [...]"

The community agreed on that and the corrected version of XEP0138 is on his way however I am not aware of a publication date.

VENDOR INFORMATION

The list of affected vendors can be found here http://xmpp.org/resources/security-notices/uncontrolled-resource-consumption-with-highly-compressed-xmpp-stanzas/

The original report as published on HackerOne, by gianko. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

XMPP servers can compress the data they exchange with clients and with other servers. Compression can be negotiated at the TLS layer, as described in RFC 6120, or at the application layer, as described in XEP-0138. This report is about the application-layer variant: after a client and server (or two servers) negotiate it, all protocol messages on that stream are compressed.

The feature exists to reduce the amount of data transferred between the protocol principals. The problem is what happens when a server decompresses a stanza without limiting the resources it spends on that task. Several XMPP server implementations supporting XEP-0138 were found to suffer from uncontrolled resource consumption (CWE-400), remotely exploitable by sending highly compressed XML elements over XMPP streams. The researcher calls these payloads "xmppbombs".

The findings were coordinated with the XMPP community, and the bug information is based on a publicly available XMPP Standards Foundation security notice that lists the affected vendors.

Setup

The testing was black-box. The researcher monitored the resources consumed by each server under test: CPU usage, RSS and VSZ memory, and disk I/O. Availability was measured as the number of honest requests processed per second during an attack, compared with the same figure when not under attack.

Three implementations were confirmed vulnerable:

Implementation Version
Prosody 0.9.3
Openfire 3.9.1
Tigase server 5.2.0

Two proofs of concept were published, one for each attack position: XMPPBombNoAuth.java and XMPPBombAuth.java. Bombs are generated with XMPPBombGen.java. In all tests the compressed bomb was 4MB and expanded to 4GB of uncompressed XMPP message.

Finding it

The starting point is the decompression step. When a server decompresses XMPP stanzas it must limit the resources allocated to the task. If it does not, it can monopolise CPU and allocate all available memory, which turns a single stream into a denial-of-service vector.

An xmppbomb is a valid XML element sent over an XML stream that contains a huge number of white spaces. The example given is an element sent during stream negotiation:

XML
<?xml version='1.0' ?>
   <stream:stream $SPACES to='$SERVER'
           xmlns='jabber:client'
           xmlns:stream='http://etherx.jabber.org/streams'
           version='1.0'>

Here $SPACES is a 4GB long string of spaces and $SERVER is the server domain name. With zlib, that message compresses to 4MB, a ratio of roughly 1:1000. The element is valid XML, so nothing about its structure is malformed; the cost is entirely in the expansion.

XEP-0170, on the recommended order of stream feature negotiation, suggests negotiating stream compression after the principals have authenticated. That would confine xmppbombs to authenticated users. However, some implementations were reported to allow compression before authentication, which opens the attack to unknown attackers. This distinction is what separates the two attacks below.

Exploitation

Step 1: generate the bomb

Bombs are produced offline with XMPPBombGen.java. Every test used a 4MB compressed bomb expanding to 4GB.

Step 2: open the stream

The attacker starts the XMPP protocol with the target:

XML
<?xml version='1.0'?><stream:stream to='server' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>

Step 3: request DEFLATE compression

The attacker asks to enable DEFLATE:

XML
<compress xmlns='http://jabber.org/protocol/compress'><method>zlib</method></compress>

Step 4: send the bomb

The attacker sends the xmppbomb over the now-compressed stream.

Steps 2 to 4 can be executed concurrently, for example by colluding attackers or from a botnet. This is attack #1, the pre-authentication variant.

Results of attack #1

Prosody and Openfire were found vulnerable to this attack.

  • Prosody allocates up to 7GB of physical memory (RSS) with a single xmppbomb carrying 4GB of payload. The process is finally killed by the kernel because of an out of memory condition.
  • Openfire uses 100% of the CPU and slightly less memory than Prosody (3GB), and writes about 400MB of data to disk.

With parallel xmppbombs (12 or 24 at once) the researcher observed delays in service availability from 100 times to 10000 times.

Attack #2: after authentication

This variant follows the same pattern, but the compression is negotiated after logging in. The attacker prepares the bomb offline, starts the XMPP protocol as in step 2 of attack #1, then authenticates:

XML
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN' client-uses-full-bind-result='true'>$TOKEN</auth>

$TOKEN is the base64 encoding of the user name and password. The attack then continues with steps 3 and 4 of attack #1: request zlib compression and send the bomb.

Tigase is vulnerable to this attack. A single 4GB xmppbomb pushes CPU usage to 100% for about 10 minutes.

Root cause

The defect is the absence of a limit on the resources spent decompressing stanzas. A server that decompresses without a bound on output size or on the work performed will expand a small compressed element into gigabytes of data, consuming memory and CPU until the operating system intervenes or the service becomes unusable.

The specifications left room for this. In the researcher's own words, points 4 and 6 of Section 13.12 of RFC 6120 are SHOULDs rather than MUSTs, and they refer only to uncompressed data. XEP-0138 mentions no XMPP-specific security consideration and instead refers to the security considerations of TLS (RFC 3749), which address a binary-oriented protocol, concerns when combining compression and encryption, and the risk of data size expansion. The researcher's view, shared during coordination, is that this grey area led developers to different decisions and so to these vulnerabilities. The suggested amendment was a subsection in Section 7 of XEP-0138 stating that if points 4 and 6 of Section 13.12 of RFC 6120 are not implemented, the implementation may be vulnerable to DoS via xmppbombs. The community agreed and a corrected version of XEP-0138 was in preparation, with no publication date known at the time of writing.

Impact

Affected servers were reported to:

  1. Consume virtual memory, and in certain cases be terminated by the operating system for out of memory conditions;
  2. Monopolise CPU usage;
  3. In certain cases, not allow administrators to disable stream compression.

Where compression is accepted before authentication, unknown attackers can trigger this. Where it is only available after authentication, the attacker needs an account, as in attack #2.

Fix

The recommended remedy is to upgrade to corrected server code. A temporary workaround is to disable XMPP-level compression. On the standards side, the proposed change was to amend XEP-0138 with a subsection in Section 7 warning that implementations which do not apply points 4 and 6 of Section 13.12 of RFC 6120 may be vulnerable to DoS via xmppbombs.

Variants to test

  • Pre-authentication compression: open a stream and request zlib before authenticating, as in attack #1. A positive result is the server accepting the compression offer and then showing a large jump in RSS or CPU when a highly compressible element is sent.
  • Post-authentication compression: authenticate first, then negotiate compression and send the bomb, as in attack #2. A positive result is the same resource spike, as seen on Tigase with CPU at 100% for about 10 minutes.
  • Parallel bombs: run 12 or 24 bombs concurrently. A positive result is a measurable drop in honest requests per second compared with the baseline.
  • Disabling compression: check whether an administrator can turn XMPP-level compression off. A positive result is finding that the option is unavailable, which matches the third reported impact.

Hunting notes

This class of bug hides in any protocol feature that expands data on the server side: application-layer compression negotiated over a stream is the case here, and the signal during recon is a server that advertises XEP-0138 support, especially if it accepts the compression offer before authentication. The measurement approach is what made the impact concrete: CPU usage, RSS and VSZ memory, disk I/O, and honest requests per second during the attack against a baseline. The researcher confirmed the vulnerability on Prosody 0.9.3, Openfire 3.9.1 and Tigase 5.2.0, measuring resource cost and availability loss.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

Imagine you post a letter that fits in an envelope, but when the recipient opens it, a thousand pages of blank paper unfold out of it. The envelope was cheap to send; the trouble is all in the opening. That is the shape of this bug.

XMPP is the messaging protocol behind chat systems (the name stands for Extensible Messaging and Presence Protocol). Servers that speak XMPP can compress what they send to each other and to chat programs, so less data travels over the network. Compression works by spotting repetition and describing it in shorthand: a long run of identical characters becomes a tiny instruction like "repeat this space four billion times". The receiver then expands the shorthand back into the full text. That expansion is the dangerous moment.

If a server expands whatever it is sent without any limit on how much work or memory it will spend, an attacker can send a tiny compressed message that expands into gigabytes. The server burns CPU and memory trying to unpack it, and can be pushed until it stops answering anyone. Security people call this class of problem uncontrolled resource consumption (catalogue number CWE-400): the software does not control how much of a shared resource, such as memory or processor time, one request is allowed to use. The researcher nicknamed the malicious payloads "xmppbombs".

The findings were coordinated with the XMPP community, and the bug information is based on a publicly available security notice from the XMPP Standards Foundation, the body that writes the protocol's specifications. That notice also lists the affected vendors.

The feature and where it goes wrong

XMPP servers can compress data in two different places:

  1. At the TLS layer, described in a document called RFC 6120. TLS is the same encryption layer that puts the padlock in your browser; it can also compress before encrypting.
  2. At the application layer, described in a document called XEP-0138. Here the compression is a feature of the chat protocol itself, negotiated between a chat client and a server, or between two servers.

This report is about the second one. Once a client and server agree to use it, every protocol message on that connection is compressed. The point of the feature is simply to move fewer bytes between the two sides.

The problem appears at the moment of decompression. When a server unpacks XMPP stanzas (the individual messages and requests in the protocol), it must cap the resources it spends doing so. If it does not, it can take over the processor and fill the memory, and a single connection becomes a way to knock the service over. That is a denial-of-service attack, usually shortened to DoS: the goal is not to steal data but to make the service unusable for everyone else.

What an xmppbomb looks like

An xmppbomb is a perfectly valid XML element, sent over an XML stream, that contains an enormous number of white spaces. XML is the text format XMPP uses to structure its messages; white space means spaces, tabs and line breaks, characters that carry no meaning of their own. The example given is an element sent while the connection is being set up:

XML
<?xml version='1.0' ?>
   <stream:stream $SPACES to='$SERVER'
           xmlns='jabber:client'
           xmlns:stream='http://etherx.jabber.org/streams'
           version='1.0'>

Line by line:

  • <?xml version='1.0' ?> announces that what follows is XML, version 1.0. It is the standard opening line of any XML document.
  • <stream:stream ...> opens the XMPP stream, the long-lived connection over which all later messages travel.
  • $SPACES is a placeholder, not real code. It stands for a string of spaces four gigabytes long. A gigabyte is roughly a thousand megabytes; four of them is far more text than any real message would ever contain.
  • to='$SERVER' is another placeholder, standing for the domain name of the server being contacted.
  • xmlns='jabber:client' and xmlns:stream='http://etherx.jabber.org/streams' declare the vocabularies (namespaces) the element uses, so the server knows how to interpret the tag names.
  • version='1.0' states which version of the XMPP protocol is being spoken.

Nothing here is malformed. The element is valid XML, so a server that only checks the shape of the message sees nothing wrong. The cost is entirely in the expansion: with the zlib compression algorithm, that four-gigabyte message shrinks to about four megabytes, a ratio of roughly 1:1000. Four megabytes is a trivial download; four gigabytes of unpacked text is not.

Who can send one

A document called XEP-0170, on the recommended order in which a connection's features should be negotiated, suggests that stream compression should be agreed only after the users have authenticated (proved who they are, usually with a username and password). If every server followed that, xmppbombs could only be sent by people who already have an account.

But some implementations were reported to allow compression before authentication. That means a stranger with no account at all can send the bomb. This difference is exactly what separates the two attacks described below: one happens before logging in, the other after.

How the testing was done

The researcher tested from the outside, without access to the servers' internals. Security people call this black-box testing: you can only observe what the system does from outside, like judging a car by driving it rather than opening the bonnet.

What was measured:

  • CPU usage: how much of the processor the server was using.
  • RSS memory: resident set size, the physical memory the process actually holds in RAM.
  • VSZ memory: virtual size, the total memory the process has reserved, which can be larger than what it physically occupies.
  • Disk I/O: how much the server read from or wrote to its disks.
  • Availability: the number of honest requests the server processed per second during an attack, compared with the same number when no attack was running. If that figure collapses, real users are being locked out.

Three server implementations were confirmed vulnerable:

Implementation Version
Prosody 0.9.3
Openfire 3.9.1
Tigase server 5.2.0

Two proofs of concept were published, one for each attack position: XMPPBombNoAuth.java and XMPPBombAuth.java. Bombs are generated with XMPPBombGen.java. A proof of concept is a small program that demonstrates a bug really works, rather than just arguing that it should. In every test the compressed bomb was 4MB and expanded to 4GB of uncompressed XMPP message.

Attack #1: the bomb before logging in

Step 1: build the bomb offline

The attacker prepares the bomb in advance with XMPPBombGen.java, on their own machine, before touching the target. Doing it offline means the target sees only the finished, tiny compressed payload.

Step 2: open the stream

The attacker starts the XMPP conversation with the target server:

XML
<?xml version='1.0'?><stream:stream to='server' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>

This is the same opening element as before, minus the spaces: it declares XML, opens the stream, names the destination server, declares the two namespaces and states the protocol version. It is the equivalent of picking up the phone and saying hello; the server now knows a client wants to talk.

Step 3: ask for compression

Next the attacker asks the server to switch on DEFLATE compression:

XML
<compress xmlns='http://jabber.org/protocol/compress'><method>zlib</method></compress>
  • <compress ...> is the request to enable compression.
  • xmlns='http://jabber.org/protocol/compress' says which specification this request belongs to, so the server knows it is the standard compression negotiation and not some other feature.
  • <method>zlib</method> names the compression algorithm wanted: zlib, the library that implements DEFLATE.

This step matters because the attack only works once the server has agreed to compress the stream. From that point on, everything the attacker sends is unpacked by the server before it is read.

Step 4: send the bomb

The attacker now sends the xmppbomb over the compressed stream. The server receives four megabytes and starts expanding them towards four gigabytes.

Steps 2 to 4 can be run at the same time by several parties, for example colluding attackers or a botnet (a network of compromised machines under one controller). Each connection adds its own load.

What happened on the tested servers

Prosody and Openfire were found vulnerable to this attack.

  • Prosody allocated up to 7GB of physical memory (RSS) from a single xmppbomb carrying 4GB of payload. The process was finally killed by the kernel, the core of the operating system, because it ran out of memory.
  • Openfire used 100% of the CPU and slightly less memory than Prosody (3GB), and wrote about 400MB of data to disk.

With parallel xmppbombs, 12 or 24 at once, the researcher observed delays in service availability from 100 times to 10000 times. In other words, a request that normally took a moment could take a hundred to ten thousand times longer.

Attack #2: the bomb after logging in

This variant follows the same pattern, but the compression is negotiated after the attacker has logged in. It applies to servers that only allow compression once a user is authenticated, so the attacker needs an account.

The attacker prepares the bomb offline, opens the XMPP stream as in step 2 of attack #1, and then authenticates:

XML
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN' client-uses-full-bind-result='true'>$TOKEN</auth>

Line by line:

  • <auth ...> is the login request.
  • xmlns='urn:ietf:params:xml:ns:xmpp-sasl' says this belongs to SASL, the standard framework for proving who you are during a connection.
  • mechanism='PLAIN' selects the simplest SASL method, which sends the credentials as they are (protected by the connection's encryption, if there is any).
  • client-uses-full-bind-result='true' is an option of that login exchange.
  • $TOKEN is a placeholder for the base64 encoding of the user name and password. Base64 is a way of writing arbitrary bytes using only ordinary text characters, so credentials can travel inside a text-based protocol. It is encoding, not encryption: anyone who sees it can decode it back.

The attack then continues with steps 3 and 4 of attack #1: request zlib compression and send the bomb.

Tigase is vulnerable to this attack. A single 4GB xmppbomb pushed CPU usage to 100% for about 10 minutes.

Why the servers were vulnerable

The defect is the absence of a limit on the resources spent decompressing stanzas. A server that unpacks data without a ceiling on the output size, or on the work it performs, will turn a small compressed element into gigabytes of data. It then consumes memory and CPU until the operating system steps in or the service becomes unusable.

The specifications left room for this. In the researcher's own words, points 4 and 6 of Section 13.12 of RFC 6120 are SHOULDs rather than MUSTs, and they refer only to uncompressed data. In standards language, a MUST is an absolute requirement and a SHOULD is a strong recommendation that an implementer may skip with good reason. XEP-0138 mentions no XMPP-specific security consideration and instead refers to the security considerations of TLS (RFC 3749), which address a binary-oriented protocol, concerns when combining compression and encryption, and the risk of data size expansion. The researcher's view, shared during coordination, is that this grey area led developers to different decisions and so to these vulnerabilities. The suggested amendment was a subsection in Section 7 of XEP-0138 stating that if points 4 and 6 of Section 13.12 of RFC 6120 are not implemented, the implementation may be vulnerable to DoS via xmppbombs. The community agreed and a corrected version of XEP-0138 was in preparation, with no publication date known at the time of writing.

What it means for a real service

Affected servers were reported to:

  1. Consume virtual memory, and in certain cases be terminated by the operating system for out of memory conditions;
  2. Monopolise CPU usage;
  3. In certain cases, not allow administrators to disable stream compression.

Where compression is accepted before authentication, unknown attackers can trigger this. Where it is only available after authentication, the attacker needs an account, as in attack #2.

The fix

The recommended remedy is to upgrade to corrected server code. A temporary workaround is to disable XMPP-level compression. On the standards side, the proposed change was to amend XEP-0138 with a subsection in Section 7 warning that implementations which do not apply points 4 and 6 of Section 13.12 of RFC 6120 may be vulnerable to DoS via xmppbombs.

What to check on your own server

  • Compression before login: open a stream and request zlib before authenticating, as in attack #1. A positive result is the server accepting the compression offer and then showing a large jump in RSS or CPU when a highly compressible element is sent.
  • Compression after login: authenticate first, then negotiate compression and send the bomb, as in attack #2. A positive result is the same resource spike, as seen on Tigase with CPU at 100% for about 10 minutes.
  • Parallel bombs: run 12 or 24 bombs concurrently. A positive result is a measurable drop in honest requests per second compared with the baseline.
  • Disabling compression: check whether an administrator can turn XMPP-level compression off. A positive result is finding that the option is unavailable, which matches the third reported impact.

Why this class of bug is worth knowing

This kind of bug hides in any protocol feature that expands data on the server side. Application-layer compression negotiated over a stream is the case here, and the signal during reconnaissance (the early look at what a server supports) is a server that advertises XEP-0138 support, especially if it accepts the compression offer before authentication. The measurement approach is what made the impact concrete: CPU usage, RSS and VSZ memory, disk I/O, and honest requests per second during the attack against a baseline. The researcher confirmed the vulnerability on Prosody 0.9.3, Openfire 3.9.1 and Tigase 5.2.0, measuring resource cost and availability loss.

Glossary

  • XMPP: Extensible Messaging and Presence Protocol, the open protocol used by chat and presence systems.
  • Stanza: a single message, request or notification in XMPP; the unit of data the protocol carries.
  • XML: a text format for structured data, built from tags in angle brackets.
  • XML stream: the long-lived connection over which XMPP elements are exchanged.
  • White space: characters such as spaces, tabs and line breaks that carry no visible content.
  • Compression: encoding data in fewer bytes by describing repetition in shorthand.
  • Decompression: expanding compressed data back into its original form.
  • zlib / DEFLATE: a widely used compression library and the algorithm it implements.
  • Compression ratio: how much smaller the compressed data is than the original, here roughly 1:1000.
  • TLS: the encryption layer used to protect connections, including the padlock in browsers.
  • Application layer: the level of the protocol that carries the actual messages, as opposed to the transport or encryption layers beneath it.
  • RFC 6120: the document describing the core XMPP protocol.
  • RFC 3749: the document describing compression within TLS.
  • XEP-0138: the XMPP extension that defines application-layer stream compression.
  • XEP-0170: the XMPP extension recommending the order in which stream features are negotiated.
  • XMPP Standards Foundation: the body that maintains the XMPP specifications.
  • Uncontrolled resource consumption (CWE-400): a weakness where software fails to limit how much memory, CPU or other shared resource a single request can use.
  • Denial of service (DoS): an attack that makes a service unusable for legitimate users.
  • xmppbomb: the researcher's name for a highly compressed XMPP element that expands into gigabytes of data.
  • Authentication: proving who you are, usually with a username and password.
  • SASL: the standard framework for authentication during a connection.
  • Base64: a text encoding for arbitrary bytes; it is not encryption.
  • Token: here, the base64-encoded username and password sent in the login request.
  • Black-box testing: testing a system only from the outside, without access to its internals.
  • CPU usage: the share of the processor's capacity a program is consuming.
  • RSS (resident set size): the physical memory a process currently holds in RAM.
  • VSZ (virtual size): the total memory a process has reserved, which can exceed what it physically uses.
  • Disk I/O: reading from and writing to storage.
  • Kernel: the core of the operating system, which manages memory and processes.
  • Out of memory: the condition where a process asks for more memory than the system can give, often leading the kernel to kill it.
  • Availability: the degree to which a service keeps answering legitimate requests.
  • Baseline: the measurement taken when no attack is running, used for comparison.
  • Proof of concept: a small program demonstrating that a vulnerability really works.
  • Botnet: a network of compromised machines controlled by one attacker.
  • MUST / SHOULD: terms in standards meaning an absolute requirement and a strong recommendation respectively.
  • Reconnaissance: the early phase of looking at what a target supports before attacking.
  • Vendor: the organisation that makes and maintains a piece of software.

More by gianko

View all

1 more disclosed report, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.