Impersonation in Sequential Messages
Sequential messages from the same user are rendered without repeating author info, and an attacker can use a custom CSS class to hide their first message so that a second message appears to be written by the previous author. This allows impersonation of another user in the chat timeline.
- Triaged in 46 days
- Fixed in 7 months
- Disclosed after 2.8 years
Summary
Sequential messages can be used to impersonate another user by hiding the leading message.
Description
Sequential messages posted by the same user on the same date are rendered without repeating the author information and timestamp.
An adversary can use customClass or className message attributes to hide the initial message of a new author from the timeline, so that the second message appears to be written by a differnet author.
const rid = "<Room ID>";
const msg = "This message was written by somebody else";
Meteor.call("sendMessage", {
msg: "will be hidden",
rid: rid,
customClass: "rc-popover"
}, () => Meteor.call("sendMessage", { msg, rid }));
Releases Affected:
- 3.18.2
- 4.0.3
Steps To Reproduce (from initial installation to vulnerability):
- Login to Rocket.Chat
- Identify target Room
- Send hidden message (
customClass: "rc-popover") - Send target message
- UI will render the target message as written by the previous messages author
Supporting Material/References

Suggested mitigation
- Mitigate CSS Injection in messages
- Indiate a messages author in the channel UI
Impact
Adversaries can send messages that appear to be written by a different user.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the message rendering logic groups sequential messages by author without verifying that the first message is actually visible, and it allows user-controlled CSS classes that can hide messages.
Impact
Adversaries can send messages that appear to be written by a different user, potentially deceiving others in the chat.
What the attacker needed
A Rocket.Chat account; access to the target room
The fix
The report suggests mitigating CSS injection in messages and indicating a message's author in the channel UI.
How it was found
- Log in to Rocket.Chat.
- Identify the target room.
- Send a hidden message using a custom CSS class.
- Send the target message.
- The UI renders the target message as written by the previous message's author.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In chat apps, when the same person sends several messages in a row, the app often shows their name only once to save space. This report shows that an attacker can send a first message that is invisible because of a styling trick, then send a second message. The app then thinks both messages are from the same person and shows the second message under the previous person's name, making it look like that person said it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.