CVE-2023-38690 matrix-appservice-irc IRC command injection via admin commands containing newlines

Medium 5.8 Published Updated

Attackers can inject IRC commands via crafted channel names, leading to code execution on the bridge bot.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-38690?

CVE-2023-38690 is a medium-severity command injection vulnerability in matrix-org matrix-appservice-irc, published on 4 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

matrix-appservice-irc is a Node.js IRC bridge for Matrix. Prior to version 1.0.1, it is possible to craft a command with newlines which would not be properly parsed. This would mean you could pass a string of commands as a channel name, which would then be run by the IRC bridge bot. Versions 1.0.1 and above are patched. There are no robust workarounds to the bug. One may disable dynamic channels in the config to disable the most common execution method but others may exist.

Weakness: CWE-77, CWE-20

Which versions are affected by CVE-2023-38690?

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

PackageAffectedFixed in
matrix-appservice-irc npmAll versions1.0.1
matrix-appservice-irc npmAll versions1.0.1

Products include Matrix Matrix Irc Bridge.

How do I fix CVE-2023-38690?

Upgrade matrix-appservice-irc to 1.0.1 or later.

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

Is CVE-2023-38690 being exploited?

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

Sources

Also known as GHSA-3pmj-jqqp-2mj3.

Is CVE-2023-38690 in your software?

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

Check your SBOMs for free