CVE-2022-36060: Matrix react sdk Matrix-react-sdk Prototype Pollution Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-2x9c-qwgf-94xr
CVSS 7.2
CWE-1321
Published
Advisory Summary

CVE-2022-36060 is a HIGH (CVSS 7.2) matrix-react-sdk prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Matrix react sdk libraries in the npm ecosystem. The issue involves matrix-react-sdk prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 3.53.0.

CVE-2022-36060 at a Glance

CVE Identifier CVE-2022-36060
GHSA Identifier GHSA-2x9c-qwgf-94xr
Severity HIGH
CVSS v3.1 Base Score 7.2
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Matrix react sdk
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2022-36060

To remediate this vulnerability, upgrade all affected Matrix react 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.

matrix-react-sdk fixed: 3.53.0
npm install matrix-react-sdk@3.53.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls matrix-react-sdk

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2022-36060, inspect your project dependencies using npm:

npm ls matrix-react-sdk

Analyze the terminal output to locate any version of Matrix react sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.53.0), your application is affected.

Note: The npm ls matrix-react-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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Matrix react 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

### Impact Events sent with special strings in key places can temporarily disrupt or impede the matrix-react-sdk from functioning properly, such as by causing room or event tile crashes. The remainder of the application can appear functional, though certain rooms/events will not be rendered. ### Patches This is fixed in matrix-react-sdk 3.53.0 ### Workarounds There are no workarounds. Please upgrade immediately. ### References https://learn.snyk.io/lessons/prototype-pollution/javascript/ ### For more information If you have any questions or comments about this advisory please email us at [security at matrix.org](mailto:security@matrix.org).

CVE-2022-36060 Affected Matrix react sdk Versions

1 component(s)
Fixed Versions:
3.53.0
Product / Package Ecosystem Affected Versions Fixed Version
matrix-react-sdk
npm
< 3.53.0
3.53.0

References

Frequently Asked Questions

What is CVE-2022-36060?
CVE-2022-36060 is a security vulnerability in Matrix react sdk involving matrix-react-sdk Prototype pollution vulnerability under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Matrix react sdk versions are affected?
Affected versions include releases prior to 3.53.0 across affected packages: matrix-react-sdk.
What version fixes CVE-2022-36060?
Upgrading to 3.53.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is matrix-react-sdk affected?
Yes, matrix-react-sdk is affected in releases prior to 3.53.0. Upgrade your dependency to 3.53.0 or later.
What is the CVSS score of CVE-2022-36060?
CVE-2022-36060 has a CVSS v3.1 base score of 7.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2022-36060?
CVE-2022-36060 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2022-36060?
Run the dependency tree command: 'npm ls matrix-react-sdk'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2x9c-qwgf-94xr",
  "modified" : "2023-03-28T23:09:13Z",
  "published" : "2023-03-28T19:57:57Z",
  "aliases" : [ "CVE-2022-36060" ],
  "summary" : "matrix-react-sdk Prototype pollution vulnerability",
  "details" : "### Impact\nEvents sent with special strings in key places can temporarily disrupt or impede the matrix-react-sdk from functioning properly, such as by causing room or event tile crashes. The remainder of the application can appear functional, though certain rooms/events will not be rendered.\n\n### Patches\nThis is fixed in matrix-react-sdk 3.53.0\n\n### Workarounds\nThere are no workarounds. Please upgrade immediately.\n\n### References\nhttps://learn.snyk.io/lessons/prototype-pollution/javascript/\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:N/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "matrix-react-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.53.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-2x9c-qwgf-94xr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-36060"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/matrix-org/matrix-react-sdk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.53.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-28T19:57:57Z",
    "nvd_published_at" : "2023-03-28T21:15:00Z"
  }
}