CVE-2023-38690: Matrix matrix-appservice-irc IRC command injection via newlines

CVE-2023-38690 · Severity: low · CVSS 3.1 · Published 2023-08-04

The matrix-appservice-irc bridge, which connects Matrix chat rooms to IRC networks, contains a vulnerability that allows users to inject unauthorized IRC commands. By including newline characters in specific inputs like channel names, an attacker can trick the bridge bot into executing unintended administrative actions. This could lead to unauthorized channel management or manipulation of the IRC bridge's behavior.

Technologies: Matrix.org Appservice IRC, matrix-appservice-irc (npm). Vendors: Matrix.org, npm.

Quick answers

Is CVE-2023-38690 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2023-38690 being exploited in the wild.
How severe is CVE-2023-38690?
Low severity, with a CVSS score of 3.1, published 4 August 2023.
Which products and versions are affected?
matrix-appservice-irc (npm) SEMVER:introduced=0,fixed=1.0.1.
Is there a fix for CVE-2023-38690?
Yes. matrix-appservice-irc (npm): upgrade to 1.0.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2023-38690 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2023-38690?
Check whether you run Matrix.org Appservice IRC or matrix-appservice-irc (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • matrix-appservice-irc (npm): upgrade to 1.0.1 or later
    npm install matrix-appservice-irc@1.0.1

Technical details

A command injection vulnerability exists in matrix-appservice-irc due to improper input validation of newline characters in administrative commands and channel names. An attacker can craft a string containing newlines that, when processed by the bridge, is interpreted as multiple separate IRC commands. This allows the attacker to bypass intended command parsing logic and execute arbitrary IRC commands as the bridge bot. The vulnerability is rooted in the command parser for admin and room commands. It is fixed in version 1.0.1 by refactoring the command parser to correctly trim and validate inputs.

Affected products

  • Matrix.org matrix-appservice-irc < 1.0.1

Identifiers

  • CVE-2023-38690
  • GHSA-3pmj-jqqp-2mj3

Timeline

  • 2023-07-31: patched: Version 1.0.1 released with security fixes.
  • 2023-08-04: disclosed: Security advisory published.

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.