# CVE-2022-39202: matrix-appservice-irc IRC mode parameter confusion

Source: https://junglewise.ai/threats/cve-2022-39202-matrix-appservice-irc-irc-mode-parameter-confusion  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-09-15. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2022-39202 · Severity: low · CVSS 3.1 · Published 2022-09-15

matrix-appservice-irc is a bridge that allows Matrix users to communicate with IRC channels. A parsing bug in mode commands (which set user permissions in IRC rooms) can cause the wrong user to be granted channel operator privileges. An attacker would need to trick a room operator into executing a malformed mode command, potentially leading to unauthorized privilege escalation and channel takeover.

Technologies: [matrix-appservice-irc (npm)](https://junglewise.ai/threats/technologies/matrix-appservice-irc). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2022-39202 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-39202 being exploited in the wild.

**How severe is CVE-2022-39202?** Low severity, with a CVSS score of 3.1, published 15 September 2022.

**Which products and versions are affected?** matrix-appservice-irc (npm) SEMVER:introduced=0,fixed=0.35.0.

**Is there a fix for CVE-2022-39202?** Yes. matrix-appservice-irc (npm): upgrade to 0.35.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2022-39202 attacked?** It is attacked over the network.

**Am I affected by CVE-2022-39202?** Check whether you run 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 0.35.0 or later

  ```sh
  npm install matrix-appservice-irc@0.35.0
  ```


## Technical details

The vulnerability is an incorrect privilege assignment flaw (CWE-266) in the underlying matrix-org/node-irc library's parsing of IRC mode commands. When multiple modes are specified in a single command, the parser incorrectly associates mode parameters with the wrong users, resulting in incorrect privilege assignment. This requires high privilege level (operator status) and user interaction (social engineering) to trigger. An attacker can achieve privilege escalation by tricking an operator into running a crafted mode command. The issue was patched in version 0.35.0 of matrix-appservice-irc.

## Affected products

- The Matrix.org Foundation matrix-appservice-irc <0.35.0

## Identifiers

- CVE-2022-39202
- GHSA-cq7q-5c67-w39w

## Timeline

- 2022-09-15: disclosed: GHSA-cq7q-5c67-w39w published
- 2022-09-15: patched: Version 0.35.0 released with fix

## References

- [https://github.com/matrix-org/matrix-appservice-irc/security/advisories/GHSA-cq7q-5c67-w39w](https://github.com/matrix-org/matrix-appservice-irc/security/advisories/GHSA-cq7q-5c67-w39w)

## Related threats

- [Matrix IRC Bridge command injection in puppeted user](https://junglewise.ai/threats/cve-2025-27146-matrix-irc-bridge-command-injection-in-puppeted-user)
- [Matrix AppService IRC message content leak via timestamp spoofing](https://junglewise.ai/threats/cve-2024-39691-matrix-appservice-irc-message-content-leak-via-timestamp-spoofing)
- [Matrix IRC Bridge message content information disclosure](https://junglewise.ai/threats/cve-2024-32000-matrix-irc-bridge-message-content-information-disclosure)
- [Matrix matrix-appservice-irc IRC command injection via newlines](https://junglewise.ai/threats/cve-2023-38690-matrix-matrix-appservice-irc-irc-command-injection-via-newlines)
- [Matrix AppService IRC information disclosure in event handling](https://junglewise.ai/threats/cve-2023-38700-matrix-appservice-irc-information-disclosure-in-event-handling)
