GHSA-52rh-5rpj-c3w6 Improper handling of multiline messages in node-irc

Not scored Published

An attacker can inject IRC commands by exploiting improper CR character handling in node-irc, requiring a user to reply to a malicious message.

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

What is GHSA-52rh-5rpj-c3w6?

GHSA-52rh-5rpj-c3w6 is a command injection vulnerability in matrix-org-irc, published on 5 May 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

node-irc is a socket wrapper for the IRC protocol that extends Node.js' EventEmitter. The vulnerability allows an attacker to manipulate a Matrix user into executing IRC commands by having them reply to a maliciously crafted message. Incorrect handling of a CR character allowed for making part of the message be sent to the IRC server verbatim rather than as a message to the channel. The vulnerability has been patched in node-irc version 1.2.1.

Which versions are affected by GHSA-52rh-5rpj-c3w6?

2 open source packages ship an affected version, including matrix-org-irc.

PackageAffectedFixed in
matrix-org-irc npmAll versions1.2.1
matrix-org-irc npmAll versions1.2.1

How do I fix GHSA-52rh-5rpj-c3w6?

Upgrade matrix-org-irc to 1.2.1 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is GHSA-52rh-5rpj-c3w6 being exploited?

There is no known exploitation of GHSA-52rh-5rpj-c3w6 in the wild and no public exploit code.

Sources

Is GHSA-52rh-5rpj-c3w6 in your software?

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

Check your SBOMs for free