CVE-2022-39236: Matrix js sdk Improper Beacon Events Vulnerability
MODERATECVE-2022-39236 is a MODERATE (CVSS 4.3) improper beacon events vulnerability (CWE-20: Improper Input Validation) affecting Matrix js sdk libraries in the npm ecosystem. The issue involves improper beacon events in matrix-js-sdk can result in availability issues. Remediation is available by upgrading affected packages to version 19.7.0.
CVE-2022-39236 at a Glance
Security Impact
CVSS: 4.3
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:U/C:N/I:N/A:L).
How to Fix CVE-2022-39236
To remediate this vulnerability, upgrade all affected Matrix js sdk 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-js-sdk@19.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls matrix-js-sdk
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-39236, inspect your project dependencies using npm:
npm ls matrix-js-sdk
Analyze the terminal output to locate any version of Matrix js sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 19.7.0), your application is affected.
Note: The npm ls matrix-js-sdk 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 js sdk, 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-2022-39236 Affected Matrix js sdk Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
matrix-js-sdk
|
npm |
≥ 17.1.0-rc.1
< 19.7.0
|
19.7.0
|
References
Frequently Asked Questions
What is CVE-2022-39236?
Which Matrix js sdk versions are affected?
What version fixes CVE-2022-39236?
Is matrix-js-sdk affected?
What is the CVSS score of CVE-2022-39236?
What CWE is associated with CVE-2022-39236?
How can I check npm dependencies for CVE-2022-39236?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hvv8-5v86-r45x",
"modified" : "2022-09-29T14:36:38Z",
"published" : "2022-09-29T14:36:38Z",
"aliases" : [ "CVE-2022-39236" ],
"summary" : "Improper beacon events in matrix-js-sdk can result in availability issues",
"details" : "### Impact\nImproperly formed beacon events (from [MSC3488](https://github.com/matrix-org/matrix-spec-proposals/pull/3488)) can disrupt or impede the matrix-js-sdk from functioning properly, potentially impacting the consumer's ability to process data safely. Note that the matrix-js-sdk can appear to be operating normally but be excluding or corrupting runtime data presented to the consumer.\n\n### Patches\nThis is patched in matrix-js-sdk v19.7.0\n\n### Workarounds\nRedacting applicable events, waiting for the sync processor to store data, and restarting the client can often fix it. Alternatively, redacting the applicable events and clearing all storage will fix the further perceived issues.\n\nDowngrading to an unaffected version, noting that such a version may be subject to other vulnerabilities, will additionally resolve the issue.\n\n### References\nN/A - This was a logic error in the SDK.\n\n### For more information\nIf you have any questions or comments about this advisory please email us at [security at matrix.org](mailto:security@matrix.org).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "matrix-js-sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "17.1.0-rc.1"
}, {
"fixed" : "19.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-hvv8-5v86-r45x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39236"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-spec-proposals/pull/3488"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-js-sdk/commit/a587d7c36026fe1fcf93dfff63588abee359be76"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/matrix-js-sdk"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-js-sdk/releases/tag/v19.7.0"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202210-35"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-29T14:36:38Z",
"nvd_published_at" : "2022-09-28T17:15:00Z"
}
}