CVE-2023-38690: Matrix appservice irc Matrix-appservice-irc IRC Command Injection Vulnerability
MODERATECVE-2023-38690 is a MODERATE (CVSS 5.0) matrix-appservice-irc irc command injection vulnerability (CWE-20: Improper Input Validation) affecting Matrix appservice irc libraries in the npm ecosystem. The issue involves matrix-appservice-irc irc command injection via admin commands containing newlines. Remediation is available by upgrading affected packages to version 1.0.1.
CVE-2023-38690 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N).
How to Fix CVE-2023-38690
To remediate this vulnerability, upgrade all affected Matrix appservice irc dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install matrix-appservice-irc@1.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls matrix-appservice-irc
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-38690, inspect your project dependencies using npm:
npm ls matrix-appservice-irc
Analyze the terminal output to locate any version of Matrix appservice irc in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.
Note: The npm ls matrix-appservice-irc command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Matrix appservice irc, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-38690 Affected Matrix appservice irc Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
matrix-appservice-irc
|
npm |
< 1.0.1
|
1.0.1
|
References
Frequently Asked Questions
What is CVE-2023-38690?
Which Matrix appservice irc versions are affected?
What version fixes CVE-2023-38690?
Is matrix-appservice-irc affected?
What is the CVSS score of CVE-2023-38690?
What CWE is associated with CVE-2023-38690?
How can I check npm dependencies for CVE-2023-38690?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3pmj-jqqp-2mj3",
"modified" : "2024-06-20T14:53:30Z",
"published" : "2023-08-04T17:26:45Z",
"aliases" : [ "CVE-2023-38690" ],
"summary" : "matrix-appservice-irc IRC command injection via admin commands containing newlines ",
"details" : "### Impact\n\nIt 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. \n\n### Patches\n\nVersions 1.0.1 and above are patched.\n\n### Workarounds\n\nThere are no robust workarounds to the bug. You can disable dynamic channels in the config to disable the most common execution method but others may exist. It is highly recommended to upgrade the bridge.\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).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "matrix-appservice-irc"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-appservice-irc/security/advisories/GHSA-3pmj-jqqp-2mj3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-38690"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-appservice-irc/commit/0afb064635d37e039067b5b3d6423448b93026d3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/matrix-appservice-irc"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-appservice-irc/releases/tag/1.0.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-04T17:26:45Z",
"nvd_published_at" : "2023-08-04T17:15:10Z"
}
}