CVE-2021-32659: matrix-appservice-bridge - Automatic Room Upgrade Handling Vulnerability

matrix-appservice-bridge Updated 02 Oct 2025

Summary

21/06/2021
Yes i
Moderate
6.5

CVE-2021-32659: Automatic room upgrade handling can be used maliciously to bridge a room non-consentually. Affects matrix-appservice-bridge versions < 2.6.1. Fixed in 2.6.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The matrix-appservice-bridge package is an npm package used for bridging communication between Matrix and other chat platforms. It allows users to connect Matrix rooms with rooms in other chat platforms, enabling seamless communication between different platforms. The package provides functionality for handling room upgrades, which involves unbridging the current room and bridging into a target room when a 'm.room.tombstone' event is encountered. However, a vulnerability exists in versions prior to 2.6.1 that allows a malicious admin to redirect traffic to a different room without the new room being aware.

Vulnerability Detail

The vulnerability arises from the lack of verification in the target room's 'm.room.create' event. When a bridge encounters a 'm.room.tombstone' event, it unbridges the current room and bridges into the target room specified in the event. However, the package does not check if the 'predecessor' field in the target room's 'm.room.create' event contains the previous room. This allows a malicious admin to repoint the traffic to a different room without the new room being aware. This can lead to unauthorized access, data leakage, or disruption of communication between platforms.

How To Fix

Latest published version: 12.0.1 as of 23 Oct 2026

npm install matrix-appservice-bridge@12.0.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.6.1

This is the first release that contains the fix.

npm install matrix-appservice-bridge@2.6.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the package is not immediately feasible, a workaround is available by disabling the automatic room upgrade handling. This can be done by removing the 'roomUpgradeOpts' key from the 'Bridge' class options when instantiating a new 'Bridge' instance. Here is an example of how to remove the 'roomUpgradeOpts' key:

// Before
const bridge = new Bridge({
  roomUpgradeOpts: {
    // room upgrade options
  },
});

// After
const bridge = new Bridge({
  // other options
});

Conclusion

The matrix-appservice-bridge package prior to version 2.6.1 is vulnerable to an automatic room upgrade handling issue that can be exploited by a malicious admin to redirect traffic to a different room without the new room being aware. It is recommended to update the package to version 2.6.1 or greater to mitigate this vulnerability. If immediate update is not possible, the automatic room upgrade handling can be disabled as a workaround. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for matrix-appservice-bridge →

Share this vulnerability

FAQ

The vulnerability allows a malicious admin of a bridged room to redirect traffic to a different room without the new room being aware. This can lead to unauthorized access, data leakage, or disruption of communication between platforms.

To fix this vulnerability, update the matrix-appservice-bridge package to version 2.6.1 or greater.

Yes, you can disable the automatic room upgrade handling by removing the 'roomUpgradeOpts' key from the 'Bridge' class options.

There are no known exploits of this vulnerability at the moment.

Related vulnerabilities

Recent vulnerabilities recorded for matrix-appservice-bridge.

How To Fix

Latest published version: 12.0.1 as of 23 Oct 2026

npm install matrix-appservice-bridge@12.0.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.6.1

This is the first release that contains the fix.

npm install matrix-appservice-bridge@2.6.1

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback