CVE-2019-11842: Matrix sydent Matrix-sydent And Matrix-synapse Use Cryptographically Vulnerability

HIGH
Advisory Identifier: GHSA-gwf7-vfjf-wf6x
CVSS 7.5
CWE-338
Published
Advisory Summary

CVE-2019-11842 is a HIGH (CVSS 7.5) matrix-sydent and matrix-synapse use cryptographically vulnerability (CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)) affecting Matrix sydent libraries in the PyPI ecosystem. The issue involves matrix-sydent and matrix-synapse use cryptographically weak prng. Remediation is available by upgrading affected packages to version 1.0.3, 0.99.3.1.

CVE-2019-11842 at a Glance

CVE Identifier CVE-2019-11842
GHSA Identifier GHSA-gwf7-vfjf-wf6x
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
Affected Product Matrix sydent
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:H/I:N/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 High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2019-11842

To remediate this vulnerability, upgrade all affected Matrix sydent 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-sydent fixed: 1.0.3
pip install matrix-sydent>=1.0.3
matrix-synapse fixed: 0.99.3.1
pip install matrix-synapse>=0.99.3.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-sydent

How to Check if You Are Affected

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

pip show matrix-sydent

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG), where the product uses a pseudo-random number generator (prng) in a security context, but the prng's algorithm is not cryptographically strong. In Matrix sydent, 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

An issue was discovered in Matrix Sydent before 1.0.3 and Synapse before 0.99.3.1. Random number generation is mishandled, which makes it easier for attackers to predict a Sydent authentication token or a Synapse random ID.

CVE-2019-11842 Affected Matrix sydent Versions

2 component(s)
Fixed Versions:
1.0.30.99.3.1
Product / Package Ecosystem Affected Versions Fixed Version
matrix-sydent
PyPI
< 1.0.3
1.0.3
matrix-synapse
PyPI
< 0.99.3.1
0.99.3.1

References

Frequently Asked Questions

What is CVE-2019-11842?
CVE-2019-11842 is a security vulnerability in Matrix sydent involving matrix-sydent and matrix-synapse Use Cryptographically Weak PRNG under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG).
Which Matrix sydent versions are affected?
Affected versions include releases prior to 1.0.3, 0.99.3.1 across affected packages: matrix-sydent, matrix-synapse.
What version fixes CVE-2019-11842?
Upgrading to 1.0.3, 0.99.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is matrix-sydent affected?
Yes, matrix-sydent is affected in releases prior to 1.0.3. Upgrade your dependency to 1.0.3 or later.
Is matrix-synapse affected?
Yes, matrix-synapse is affected in releases prior to 0.99.3.1. Upgrade your dependency to 0.99.3.1 or later.
What is the CVSS score of CVE-2019-11842?
CVE-2019-11842 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:H/I:N/A:N.
What CWE is associated with CVE-2019-11842?
CVE-2019-11842 is classified under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) (The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.).
How can I check PyPI dependencies for CVE-2019-11842?
Run the dependency tree command: 'pip show matrix-sydent'. 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-gwf7-vfjf-wf6x",
  "modified" : "2024-09-30T20:32:28Z",
  "published" : "2022-05-24T16:45:24Z",
  "aliases" : [ "CVE-2019-11842" ],
  "summary" : "matrix-sydent and matrix-synapse Use Cryptographically Weak PRNG",
  "details" : "An issue was discovered in Matrix Sydent before 1.0.3 and Synapse before 0.99.3.1. Random number generation is mishandled, which makes it easier for attackers to predict a Sydent authentication token or a Synapse random ID.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "matrix-sydent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "matrix-synapse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.99.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-11842"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-gwf7-vfjf-wf6x"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/matrix-synapse/PYSEC-2019-185.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://matrix.org/blog/2019/05/03/security-updates-sydent-1-0-3-synapse-0-99-3-1-and-riot-android-0-9-0-0-8-99-0-8-28-a"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-338" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-27T21:34:46Z",
    "nvd_published_at" : "2019-05-09T18:29:00Z"
  }
}