{"id":"CVE-2022-39202","aliases":["CVE-2022-39202","GHSA-cq7q-5c67-w39w"],"related":[],"kind":"vulnerability","state":"published","title":"IRC mode parameter confusion in matrix-appservice-irc","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nIRC 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.\n\nMode 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.\n\n### Patches\n\nThe vulnerability has been patched in matrix-appservice-irc 0.35.0.\n\n### Workarounds\n\nRefrain from entering mode commands suggested by untrusted users. Avoid using multiple modes in a single command.\n\n### References\n\n- https://matrix.org/blog/2022/09/13/security-release-of-matrix-appservice-irc-0-35-0-high-severity\n\n### Credits\n\nDiscovered and reported by [Val Lorentz](https://valentin-lorentz.fr/).\n\n### For more information\n\nIf you have any questions or comments about this advisory email us at [security@matrix.org](mailto:security@matrix.org).","format":"markdown","source":"ghsa"},{"lang":"es","text":"matrix-appservice-irc es un puente IRC de código abierto Node.js para Matrix. El protocolo Internet Relay Chat (IRC) permite especificar múltiples modos en un solo comando de modo. Debido a un error en la biblioteca matrix-org/node-irc subyacente, las versiones afectadas de matrix-appservice-irc llevan a cabo el análisis de dichos modos de forma incorrecta, resultando potencialmente en que sean dados permisos al usuario equivocado. Los comandos de modo sólo pueden ser ejecutados por usuarios privilegiados, por lo que esto sólo puede ser abusado si un operador es engañado para ejecutar el comando en nombre de un atacante. La vulnerabilidad ha sido parcheada en matrix-appservice-irc versión 0.35.0. Como mitigación, los usuarios deben abstenerse de introducir comandos de modo sugeridos por usuarios no confiables. Evite usar varios modos en un solo comando","source":"nvd"}],"published":"2022-09-13T18:10:15.000Z","modified":"2026-06-17T04:57:54.377Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:L/A:L","score":4.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L","score":6.3,"rating":"MEDIUM"}],"cwes":["CWE-269"],"affected":[{"ranges":[{"version":"< 0.35.0","status":"affected"}],"vendor":"matrix-org","product":"matrix-appservice-irc","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.35.0"}],"ecosystem":"npm","package":"matrix-appservice-irc","purl":"pkg:npm/matrix-appservice-irc","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.35.0"}],"vendor":"matrix","product":"matrix_irc_bridge","cpe":"cpe:2.3:a:matrix:matrix_irc_bridge:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/matrix-org/matrix-appservice-irc/security/advisories/GHSA-cq7q-5c67-w39w","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/matrix-org/matrix-appservice-irc/commit/5f87dbed87b4b6dc49b7965ff152ee8535719e67","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://matrix.org/blog/2022/09/13/security-release-of-matrix-appservice-irc-0-35-0-high-severity/","tags":["vendor-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39202","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/matrix-org/matrix-appservice-irc","tags":["package"],"sources":["ghsa"]},{"url":"https://matrix.org/blog/2022/09/13/security-release-of-matrix-appservice-irc-0-35-0-high-severity","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-23T14:00:40.533Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-39202","url":"https://www.cve.org/CVERecord?id=CVE-2022-39202","licence":"CVE Terms of Use","modified":"2025-04-23T17:11:14.546Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cq7q-5c67-w39w","url":"https://github.com/advisories/GHSA-cq7q-5c67-w39w","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:14.936Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-39202","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39202","licence":"Public domain","modified":"2026-06-17T04:57:54.377Z"}],"updatedAt":"2026-11-25T22:58:14.874Z","epss":{"score":0.00925,"percentile":0.61461,"date":"2026-12-01T12:00:22.000Z"}}