CVE-2022-39202 IRC mode parameter confusion in matrix-appservice-irc

Medium 4.3 Published Updated

Incorrect parsing of IRC mode commands allows attackers to trick operators into granting unauthorized permissions to specific users.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-39202?

CVE-2022-39202 is a medium-severity vulnerability in matrix-org matrix-appservice-irc, published on 13 Sep 2022. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

matrix-appservice-irc is an open source Node.js IRC bridge for Matrix. The Internet Relay Chat (IRC) protocol allows you to specify multiple modes in a single mode command. Due to a bug in the underlying matrix-org/node-irc library, affected versions of matrix-appservice-irc perform parsing of such modes incorrectly, potentially resulting in the wrong user being given permissions. Mode commands can only be executed by privileged users, so this can only be abused if an operator is tricked into running the command on behalf of an attacker. The vulnerability has been patched in matrix-appservice-irc 0.35.0. As a workaround users should refrain from entering mode commands suggested by untrusted users. Avoid using multiple modes in a single command.

Weakness: CWE-269

Which versions are affected by CVE-2022-39202?

2 open source packages ship an affected version, including matrix-appservice-irc. It affects 1 product.

PackageAffectedFixed in
matrix-appservice-irc npmAll versions0.35.0
matrix-appservice-irc npmAll versions0.35.0

Products include Matrix Matrix Irc Bridge.

How do I fix CVE-2022-39202?

Upgrade matrix-appservice-irc to 0.35.0 or later.

Is CVE-2022-39202 being exploited?

There is no known exploitation of CVE-2022-39202 in the wild and no public exploit code.

Sources

Also known as GHSA-cq7q-5c67-w39w.

Is CVE-2022-39202 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free