Vulnerabilities in pkg:pypi/matrix-sydent
PACKAGECVE-2021-29431 is a MODERATE (CVSS 7.7) ssrf vulnerability (CWE-20: Improper Input Validation) affecting Matrix sydent libraries in the PyPI ecosystem. The issue involves ssrf in sydent due to missing validation of hostnames. Remediation is available by upgrading affected packages to version 2.3.0.
pkg:pypi/matrix-sydent
Vulnerability advisories affecting package pkg:pypi/matrix-sydent. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9jhm-8m8c-c3f4 | CVE-2021-29431 | MODERATE | SSRF in Sydent due to missing validation of hostnames |
| GHSA-gwf7-vfjf-wf6x | CVE-2019-11842 | HIGH | matrix-sydent and matrix-synapse Use Cryptographically Weak PRNG |
| GHSA-mh74-4m5g-fcjx | CVE-2021-29432 | MODERATE | Malicious users could abuse Sydent to control the content of invitation emails |
| GHSA-wmg4-8cp2-hpg9 | CVE-2021-29430 | HIGH | Sydent vulnerable to denial of service attack via memory exhaustion |
| GHSA-pw4v-gr34-2553 | CVE-2021-29433 | MODERATE | Sydent DoS (via resource exhaustion) due to improper input validation |
| GHSA-p6hw-wm59-3g5g | CVE-2023-38686 | CRITICAL | Sydent does not verify email server certificates |
| GHSA-q9h8-gpw5-c95c | CVE-2019-11340 | MODERATE | Matrix Sydent mishandles emails |
CVE-2021-29431 at a Glance
Security Impact
CVSS: 7.7
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:C/C:H/I:N/A:N).
How to Fix CVE-2021-29431
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.
pip install matrix-sydent>=2.3.0
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-2021-29431, 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 2.3.0), 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-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 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
CVE-2021-29431 Affected Matrix sydent Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
matrix-sydent
|
PyPI |
< 2.3.0
|
2.3.0
|
References
Frequently Asked Questions
What is CVE-2021-29431?
Which Matrix sydent versions are affected?
What version fixes CVE-2021-29431?
Is matrix-sydent affected?
What is the CVSS score of CVE-2021-29431?
What CWE is associated with CVE-2021-29431?
How can I check PyPI dependencies for CVE-2021-29431?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9jhm-8m8c-c3f4",
"modified" : "2024-09-30T20:40:49Z",
"published" : "2021-04-19T14:54:15Z",
"aliases" : [ "CVE-2021-29431" ],
"summary" : "SSRF in Sydent due to missing validation of hostnames",
"details" : "### Impact\n\nSydent can be induced to send HTTP GET requests to internal systems, due to lack of parameter validation or IP address blacklisting.\n\nIt is not possible to exfiltrate data or control request headers, but it might be possible to use the attack to perform an internal port enumeration.\n\n### Patches\n\nFixed in 9e57334, 8936925, 3d531ed, 0f00412\n\n### Workarounds\n\nA potential workaround would be to use a firewall to ensure that Sydent cannot reach internal HTTP resources.\n\n### For more information\n\nIf you have any questions or comments about this advisory, email us at security@matrix.org.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "matrix-sydent"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/sydent/security/advisories/GHSA-9jhm-8m8c-c3f4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-29431"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/sydent/commit/0f00412017f25619bc36c264b29ea96808bf310a"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/sydent/commit/3d531ed50d2fd41ac387f36d44d3fb2c62dd22d3"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/sydent/commit/8936925f561b0c352c2fa922d5097d7245aad00a"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/sydent/commit/9e573348d81df8191bbe8c266c01999c9d57cd5f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/sydent"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/sydent/releases/tag/v2.3.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/matrix-sydent/PYSEC-2021-22.yaml"
}, {
"type" : "WEB",
"url" : "https://pypi.org/project/matrix-sydent"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-15T21:00:29Z",
"nvd_published_at" : "2021-04-15T21:15:00Z"
}
}