CVE-2022-3971: SQL Injection Vulnerability in matrix-appservice-irc
Summary
CVE-2022-3971: Matrix-appservice-irc vulnerable to sql injection via roomIds argument. Affects matrix-appservice-irc versions < 0.36.0. Fixed in 0.36.0. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
matrix-appservice-irc is an npm package that provides a bridge between Matrix and IRC networks, allowing users to communicate between the two platforms. It facilitates the synchronization of messages and user information between Matrix rooms and IRC channels. The package is widely used in applications that require integration between Matrix and IRC. However, versions up to 0.35.1 of matrix-appservice-irc are vulnerable to a SQL injection attack.
Vulnerability Detail
The vulnerability in matrix-appservice-irc arises from improper handling of the roomIds argument in the src/datastore/postgres/PgDataStore.ts file. An attacker can manipulate the roomIds argument to inject malicious SQL code, leading to unauthorized access or modification of the underlying database. This vulnerability has a CVSS score of 5.6, indicating a moderate severity level. Exploiting this vulnerability can have serious consequences, including data breaches, unauthorized data manipulation, and potential privilege escalation.
How To Fix
Latest published version: 0.36.1 as of 23 Oct 2026
npm install matrix-appservice-irc@0.36.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
0.36.0
This is the first release that contains the fix.
npm install matrix-appservice-irc@0.36.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of matrix-appservice-irc to mitigate the risk of SQL injection.
Conclusion
The SQL injection vulnerability in matrix-appservice-irc can be mitigated by upgrading to version 0.36.0 or later. It is crucial to promptly apply the fix to prevent potential unauthorized access or modification of the database. For further assistance or support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for matrix-appservice-irc →
FAQ
matrix-appservice-irc is an npm package that enables communication between Matrix and IRC networks.
SQL injection is a type of security vulnerability where an attacker can manipulate SQL queries to execute unauthorized database operations.
Exploiting this vulnerability can lead to unauthorized access or modification of the database, data breaches, and potential privilege escalation.
To fix this vulnerability, upgrade matrix-appservice-irc to version 0.36.0 or later.
No, upgrading to the fixed version is the only known solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for matrix-appservice-irc.