CVE-2024-42347: Matrix react sdk Matrix SDK For React's URL Vulnerability

MODERATE
Advisory Identifier: GHSA-f83w-wqhc-cfp4
CVSS 4.1
CWE-359
Published
Advisory Summary

CVE-2024-42347 is a MODERATE (CVSS 4.1) matrix sdk for react's url vulnerability (CWE-359: Exposure of Private Personal Information to an Unauthorized Actor) affecting Matrix react sdk libraries in the npm ecosystem. The issue involves matrix sdk for react's url preview setting for a room is controllable by the homeserver. Remediation is available by upgrading affected packages to version 3.105.1.

CVE-2024-42347 at a Glance

CVE Identifier CVE-2024-42347
GHSA Identifier GHSA-f83w-wqhc-cfp4
Severity MODERATE
CVSS v3.1 Base Score 4.1
CWE Classification CWE-359: Exposure of Private Personal Information to an Unauthorized Actor
Affected Product Matrix react sdk
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.1

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

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

How to Fix CVE-2024-42347

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.105.1
npm install matrix-react-sdk@3.105.1
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-2024-42347, 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.105.1), 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-359: Exposure of Private Personal Information to an Unauthorized Actor, where the product does not properly prevent a person's private, personal information from being accessed by actors who either (1) are not explicitly authorized to access the information or (2) do not have the implicit consent of the person about whom the information is collected. 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 A malicious homeserver could manipulate a user's account data to cause the client to enable URL previews in end-to-end encrypted rooms, in which case any URLs in encrypted messages would be sent to the server. Even if the CVSS score would be 4.1 ([AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N&version=3.1)) the maintainer classifies this as High severity issue. ### Patches This was patched in matrix-react-sdk 3.105.1. ### Workarounds Deployments that trust their homeservers, as well as closed federations of trusted servers, are not affected. ### References N/A.

CVE-2024-42347 Affected Matrix react sdk Versions

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

References

Frequently Asked Questions

What is CVE-2024-42347?
CVE-2024-42347 is a security vulnerability in Matrix react sdk involving Matrix SDK for React's URL preview setting for a room is controllable by the homeserver under CWE-359: Exposure of Private Personal Information to an Unauthorized Actor.
Which Matrix react sdk versions are affected?
Affected versions include releases prior to 3.105.1 across affected packages: matrix-react-sdk.
What version fixes CVE-2024-42347?
Upgrading to 3.105.1 (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.105.1. Upgrade your dependency to 3.105.1 or later.
What is the CVSS score of CVE-2024-42347?
CVE-2024-42347 has a CVSS v3.1 base score of 4.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2024-42347?
CVE-2024-42347 is classified under CWE-359: Exposure of Private Personal Information to an Unauthorized Actor (The product does not properly prevent a person's private, personal information from being accessed by actors who either (1) are not explicitly authorized to access the information or (2) do not have the implicit consent of the person about whom the information is collected.).
How can I check npm dependencies for CVE-2024-42347?
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-f83w-wqhc-cfp4",
  "modified" : "2024-08-08T16:38:00Z",
  "published" : "2024-08-06T14:12:45Z",
  "aliases" : [ "CVE-2024-42347" ],
  "summary" : "Matrix SDK for React's URL preview setting for a room is controllable by the homeserver",
  "details" : "### Impact\nA malicious homeserver could manipulate a user's account data to cause the client to enable URL previews in end-to-end encrypted rooms, in which case any URLs in encrypted messages would be sent to the server.\n\nEven if the CVSS score would be 4.1 ([AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N&version=3.1)) the maintainer classifies this as High severity issue.\n\n### Patches\nThis was patched in matrix-react-sdk 3.105.1.\n\n### Workarounds\nDeployments that trust their homeservers, as well as closed federations of trusted servers, are not affected.\n\n### References\nN/A.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N/U:Red"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "matrix-react-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.105.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-f83w-wqhc-cfp4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-42347"
  }, {
    "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.105.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-359" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-06T14:12:45Z",
    "nvd_published_at" : "2024-08-06T18:15:57Z"
  }
}