CVE-2019-5885: Matrix synapse Matrix Synapse Predictable Secret Key Vulnerability

HIGH
Advisory Identifier: GHSA-jrqm-v8cv-53ww
CVSS 7.5
CWE-330
Published
Advisory Summary

CVE-2019-5885 is a HIGH (CVSS 7.5) matrix synapse predictable secret key vulnerability (CWE-330: Use of Insufficiently Random Values) affecting Matrix synapse libraries in the PyPI ecosystem. The issue involves matrix synapse predictable secret key. Remediation is available by upgrading affected packages to version 0.34.0.1.

CVE-2019-5885 at a Glance

CVE Identifier CVE-2019-5885
GHSA Identifier GHSA-jrqm-v8cv-53ww
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-330: Use of Insufficiently Random Values
Affected Product Matrix synapse
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2019-5885

To remediate this vulnerability, upgrade all affected Matrix synapse 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-synapse fixed: 0.34.0.1
pip install matrix-synapse>=0.34.0.1
Verify Direct and Transitive Dependencies

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

pip show matrix-synapse

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2019-5885, inspect your installed packages using pip:

pip show matrix-synapse

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

Note: The pip show matrix-synapse command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-330: Use of Insufficiently Random Values, where the product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. In Matrix synapse, 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

Matrix Synapse before 0.34.0.1, when the `macaroon_secret_key` authentication parameter is not set, uses a predictable value to derive a secret key and other secrets which could allow remote attackers to impersonate users.

CVE-2019-5885 Affected Matrix synapse Versions

1 component(s)
Fixed Versions:
0.34.0.1
Product / Package Ecosystem Affected Versions Fixed Version
matrix-synapse
PyPI
< 0.34.0.1
0.34.0.1

References

Frequently Asked Questions

What is CVE-2019-5885?
CVE-2019-5885 is a security vulnerability in Matrix synapse involving Matrix Synapse Predictable Secret Key under CWE-330: Use of Insufficiently Random Values.
Which Matrix synapse versions are affected?
Affected versions include releases prior to 0.34.0.1 across affected packages: matrix-synapse.
What version fixes CVE-2019-5885?
Upgrading to 0.34.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is matrix-synapse affected?
Yes, matrix-synapse is affected in releases prior to 0.34.0.1. Upgrade your dependency to 0.34.0.1 or later.
What is the CVSS score of CVE-2019-5885?
CVE-2019-5885 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-5885?
CVE-2019-5885 is classified under CWE-330: Use of Insufficiently Random Values (The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.).
How can I check PyPI dependencies for CVE-2019-5885?
Run the dependency tree command: 'pip show matrix-synapse'. 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-jrqm-v8cv-53ww",
  "modified" : "2024-09-24T15:41:47Z",
  "published" : "2022-05-13T01:08:16Z",
  "aliases" : [ "CVE-2019-5885" ],
  "summary" : "Matrix Synapse Predictable Secret Key",
  "details" : "Matrix Synapse before 0.34.0.1, when the `macaroon_secret_key` authentication parameter is not set, uses a predictable value to derive a secret key and other secrets which could allow remote attackers to impersonate users.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "matrix-synapse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.34.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-5885"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/issues/4664"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/pull/4315"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/pull/4373"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/matrix-org/synapse"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/synapse/blob/67f9e5293ea6650b2ec284c0b7503f3f3eade94b/docs/changelogs/CHANGES-pre-1.0.md?plain=1#L460"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2019-187.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/32Y6KD3OAHCG5P33HC2QEX3NUZOSXCGZ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VMCLO5PUPBA756UKY72PKUWL4RRM4W6K"
  }, {
    "type" : "WEB",
    "url" : "https://matrix.org/blog/2019/01/10/critical-security-update-synapse-0-34-0-1-synapse-0-34-1-1"
  }, {
    "type" : "WEB",
    "url" : "https://matrix.org/blog/2019/01/15/further-details-on-critical-security-update-in-synapse-affecting-all-versions-prior-to-0-34-1-cve-2019-5885"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-330" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-19T20:18:22Z",
    "nvd_published_at" : "2019-03-21T16:01:00Z"
  }
}