Skip to content
DoS Disclosed report Beginner CVE-2021-37863

Specially crafted message request crashes the webapp for users who view the message

A user can add a deleted_at field with a positive value to a message creation request, causing the webapp to crash for anyone viewing the channel. An attacker could repeatedly send such messages to prevent users from accessing the channel or the entire webapp.

thesecuritydev Follow

Originally disclosed on HackerOne

Bounty$150 Low 3.5 View original
  • Triaged in 12 hours
  • Fixed in 4 months
  • Paid in 43 hours
  • Disclosed after 8 months

Summary:

If you post a message with a modified deleted_at JSON parameter, the webapp will crash for anyone currently viewing the channel, or for anyone viewing a different channel if they switch to that channel afterward.

Steps To Reproduce:

  1. Go to a team channel, with Burp Suite ready.
  2. Send a message, intercepting the request with Burp. The JSON request contains keys like message, channel_id, and pending_post_id.
  3. Add the following key to the JSON request: deleted_at, with a value that's greater than 0. For example: "deleted_at": 10.
  4. Now if you send the request, the webapp will crash with a blank screen and you will have to refresh the page. Note: If you want to send the request again, you may have to update the pending_post_id to some other unique value.

It affects all users viewing the channel, not just the sender. Also, you don't even have to be in the channel when the message is sent. If you are already on a different channel, and you switch to the affected channel after the message is sent, it still has the same effect.

Impact

A user could prevent others from accessing a channel by continually making this request so that it's impossible to load the webapp, because a new message would come and crash it even after refreshing the page. And since after refreshing you will still be on the channel, it could prevent the users from having access to the entire webapp, as they may not be able to exit the channel quick enough to prevent the crash.

You could also send a DM to someone and when they click to view the message the webapp will crash.

The original report as published on HackerOne, by thesecuritydev. 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. 3 min read.

Context

Mattermost is a team messaging product, and the asset in this report is mattermost/mattermost-webapp, the browser client that renders channels and messages. Posting a message in a channel is an ordinary, everyday action: the client sends a JSON request describing the new post, and the server stores it and broadcasts it to everyone viewing that channel.

The report describes what happens when one of the fields in that post-creation request is set to a value the client does not expect. A message posted with a modified deleted_at JSON parameter makes the webapp crash for anyone viewing the channel. The crash is a blank screen, and the only recovery is to refresh the page.

Setup

The only tool the researcher names is Burp Suite, used to intercept and modify the request that creates a message. The precondition is an ordinary team channel that the attacker can post in. No special role, plugin or configuration is mentioned. The report does not give a version number for the webapp or the server.

Finding it

The researcher's observation is that the post-creation request carries a set of JSON keys, among them message, channel_id and pending_post_id. Adding a deleted_at key with a value greater than zero, for example 10, is enough to break the client for everyone who views the resulting message. The report does not explain how the researcher came to try that particular key; it presents the result directly.

Exploitation

Step 1: open a channel with Burp ready

Go to a team channel with Burp Suite running so the post-creation request can be intercepted.

Step 2: send a message and intercept the request

The request that creates a post is JSON and contains keys such as message, channel_id and pending_post_id. The report does not reproduce the full request, only these key names.

Step 3: add the deleted_at key

Add the following key to the JSON request, with a value greater than 0:

JSON
"deleted_at": 10

Step 4: forward the request

When the modified request is sent, the webapp crashes with a blank screen and the page has to be refreshed. If the request is to be sent again, the pending_post_id may need to be changed to another unique value.

The effect is not limited to the sender. All users viewing the channel are affected. The attacker does not even have to be in the channel when the message is sent: a user who is on a different channel and switches to the affected channel afterwards gets the same crash.

Root cause

The report does not include any code or server-side analysis, so the exact defect is not established in the text. What it does show is that the client accepts a post whose deleted_at is a positive value and fails to render it, taking the whole webapp down to a blank screen rather than degrading gracefully. Whether the server should have rejected or normalised the field on creation, or whether the client should have handled a deleted post defensively, is not stated.

Impact

A user can prevent others from accessing a channel by continually sending this request. Because a new message arrives and crashes the webapp even after a refresh, it can become impossible to load the channel. Since a refresh leaves the user on the same channel, the crash can deny access to the entire webapp, as the user may not be able to leave the channel quickly enough to avoid it.

The same technique works against a direct message: sending a DM to someone means the webapp crashes when they click to view the message.

The report is rated low severity with a CVSS score of 3.5, weakness class Uncontrolled Resource Consumption, and a bounty of 150.00 USD.

Fix

It also does not say what the correct behaviour should be. A reasonable direction, not stated in the report, is to reject or normalise a client-supplied deleted_at on post creation and to make the client render unexpected post states without crashing.

Variants to test

Hunting notes

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. 7 min read.

What happened, in plain words

Mattermost is a team messaging product: people join channels and post messages, much like a group chat. The part of it discussed here is mattermost/mattermost-webapp, which is the browser client, the program that runs in your browser and draws the channels and messages on screen.

Normally, posting a message is a very ordinary action. When you type a message and press send, your browser sends a small package of data to the server describing the new post. The server saves it and passes it on to everyone who is looking at that channel. That package is written in a format called JSON, which is just a way of writing labelled pieces of information, like a form with named boxes.

The researcher found that one of those labelled pieces of information, a field called deleted_at, can be added by hand with a value the browser client does not expect. When a message like that is posted, the browser client crashes for anyone who views the channel. The crash shows up as a blank screen, and the only way out is to refresh the page.

The report is classed as Uncontrolled Resource Consumption. The report is rated low severity, with a CVSS score of 3.5, and a bounty of 150.00 USD was paid.

Context

Mattermost is a team messaging product. The asset in this report is mattermost/mattermost-webapp, the browser client that renders channels and messages. Posting a message in a channel is an everyday action: the client sends a JSON request describing the new post, the server stores it, and it is broadcast to everyone viewing that channel.

The report describes what happens when one of the fields in that post-creation request is set to a value the client does not expect. A message posted with a modified deleted_at JSON parameter makes the webapp crash for anyone viewing the channel. The crash is a blank screen, and the only recovery is to refresh the page.

Setup

The only tool the researcher names is Burp Suite. Burp Suite is a program that sits between your browser and a website and lets you look at, and change, the data going back and forth. Here it is used to intercept and modify the request that creates a message. Think of it as a postal worker who lets you open a letter, change a word, and seal it again before delivery.

The precondition is an ordinary team channel that the attacker can post in. No special role, plugin or configuration is mentioned. The report does not give a version number for the webapp or the server.

Finding it

The researcher's observation is that the post-creation request carries a set of JSON keys, among them message, channel_id and pending_post_id. A key is simply the name of a box in the JSON form, and its value is what is written in that box. Adding a deleted_at key with a value greater than zero, for example 10, is enough to break the client for everyone who views the resulting message. The report does not explain how the researcher came to try that particular key; it presents the result directly.

Exploitation

Step 1: open a channel with Burp ready

Go to a team channel with Burp Suite running so the post-creation request can be intercepted. The reason for this step is that the request only exists for a moment, while your browser sends it, so the tool has to be listening before you press send.

Step 2: send a message and intercept the request

The request that creates a post is JSON and contains keys such as message, channel_id and pending_post_id. The report does not reproduce the full request, only these key names. In plain terms: message is the text you typed, channel_id identifies which channel the message belongs to, and pending_post_id is a temporary label the client gives the message while it is still being sent, so it can recognise the message when the server confirms it.

Step 3: add the deleted_at key

Add the following key to the JSON request, with a value greater than 0:

JSON
"deleted_at": 10

Line by line: deleted_at is the name of the box being added. The name suggests a timestamp recording when something was deleted. 10 is the value placed in that box, a number greater than zero. The report gives 10 as an example value greater than zero.

Step 4: forward the request

When the modified request is sent, the webapp crashes with a blank screen and the page has to be refreshed. If the request is to be sent again, the pending_post_id may need to be changed to another unique value,

The effect is not limited to the sender. All users viewing the channel are affected. The attacker does not even have to be in the channel when the message is sent: a user who is on a different channel and switches to the affected channel afterwards gets the same crash.

Root cause

The report does not include any code or server-side analysis, so the exact defect is not established in the text. What it does show is that the client accepts a post whose deleted_at is a positive value and fails to render it, taking the whole webapp down to a blank screen rather than degrading gracefully. Whether the server should have rejected or normalised the field on creation, or whether the client should have handled a deleted post defensively, is not stated.

Impact

A user can prevent others from accessing a channel by continually sending this request. Because a new message arrives and crashes the webapp even after a refresh, it can become impossible to load the channel. Since a refresh leaves the user on the same channel, the crash can deny access to the entire webapp, as the user may not be able to leave the channel quickly enough to avoid it.

The same technique works against a direct message: sending a DM to someone means the webapp crashes when they click to view the message.

The report is rated low severity with a CVSS score of 3.5, weakness class Uncontrolled Resource Consumption, and a bounty of 150.00 USD.

Fix

It also does not say what the correct behaviour should be. A reasonable direction, not stated in the report, is to reject or normalise a client-supplied deleted_at on post creation and to make the client render unexpected post states without crashing.

Variants to test

Hunting notes

Glossary

  • API: the set of addresses and rules a program uses to talk to a server, like a menu of requests you are allowed to make.
  • Asset: the specific piece of software or system a report is about.
  • Blank screen: a page that shows nothing at all because the program running it has stopped working.
  • Broadcast: sending the same data to every connected user who is interested in it.
  • Burp Suite: a tool that sits between your browser and a website so you can inspect and change the data being sent.
  • Channel: a named conversation area inside a team messaging product.
  • Client: the program on your side, here the browser app, that talks to the server.
  • Crash: a program stopping unexpectedly instead of continuing to work.
  • CVSS: a standard scoring system for how serious a security flaw is.
  • Direct message (DM): a private message sent to one person rather than a whole channel.
  • Endpoint: a specific address on a server that accepts a particular kind of request.
  • Field: a named box in a form or data structure, holding one piece of information.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • Impact: what an attacker can actually achieve by exploiting a flaw.
  • Intercept: to catch a request in transit so you can read or change it before it reaches its destination.
  • JSON: a text format for writing labelled pieces of data, like a form with named boxes.
  • Key: the name of a box in a JSON structure.
  • Normalise: to clean up or standardise input so it always takes an expected form.
  • Parameter: another word for a named value passed in a request.
  • Payload: the part of a request that carries the data you are sending.
  • Refresh: reloading a page in the browser.
  • Render: to draw something on screen from data.
  • Request: a message your browser sends to a server asking it to do something.
  • Root cause: the underlying defect that makes a flaw possible.
  • Server: the computer that stores data and answers requests from clients.
  • Severity: how serious a flaw is judged to be.
  • Timestamp: a recorded date and time.
  • Uncontrolled Resource Consumption: a flaw where input makes a program use up or mishandle its resources until it stops working.
  • Value: what is written inside a named box.
  • Vulnerability: a weakness in software that someone can abuse to cause harm.
  • Webapp: a program that runs in your browser and talks to a server.

More by thesecuritydev

View all

2 more disclosed reports, best first.

More from Mattermost

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.