Vulnerabilities in pkg:golang/github.com/matrix-org/gomatrixserverlib

PACKAGE
Advisory Identifier: GHSA-4ff6-858j-r822
Advisory Summary

CVE-2024-52594 is a MODERATE (CVSS 4.3) gomatrixserverlib server-side request forgery (ssrf) vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Github.com/matrix org/gomatrixserverlib libraries in the Go ecosystem. The issue involves gomatrixserverlib server-side request forgery (ssrf) on redirects and federation. Remediation is available by upgrading affected packages to version 0.0.0-20250116181547-c4f1e01eab0d.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/matrix-org/gomatrixserverlib

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/matrix-org/gomatrixserverlib. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4ff6-858j-r822 CVE-2024-52594 MODERATE Gomatrixserverlib Server-Side Request Forgery (SSRF) on redirects and federation
GHSA-grvv-h2f9-7v9c CVE-2022-36009 MODERATE gomatrixserverlib and Dendrite vulnerable to incorrect parsing of the event default power level in event auth

CVE-2024-52594 at a Glance

CVE Identifier CVE-2024-52594
GHSA Identifier GHSA-4ff6-858j-r822
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Github.com/matrix org/gomatrixserverlib
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

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:U/C:L/I:N/A:N).

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

How to Fix CVE-2024-52594

To remediate this vulnerability, upgrade all affected Github.com/matrix org/gomatrixserverlib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/matrix-org/gomatrixserverlib fixed: 0.0.0-20250116181547-c4f1e01eab0d
Upgrade github.com/matrix-org/gomatrixserverlib to 0.0.0-20250116181547-c4f1e01eab0d
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/matrix-org/gomatrixserverlib

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-52594, inspect your project dependencies for Github.com/matrix org/gomatrixserverlib:

inspect dependencies for github.com/matrix-org/gomatrixserverlib

Analyze the terminal output to locate any version of Github.com/matrix org/gomatrixserverlib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20250116181547-c4f1e01eab0d), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Github.com/matrix org/gomatrixserverlib, 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 Gomatrixserverlib is vulnerable to server-side request forgery, serving content from a private network it can access, under certain conditions. ### Patches c4f1e01eab0dd435709ad15463ed38a079ad6128 fixes this issue. ### Workarounds Use a local firewall to limit the network segments and hosts the service using gomatrixserverlib can access. ### References N/A

CVE-2024-52594 Affected Github.com/matrix org/gomatrixserverlib Versions

1 component(s)
Fixed Versions:
0.0.0-20250116181547-c4f1e01eab0d
Product / Package Ecosystem Affected Versions Fixed Version
github.com/matrix-org/gomatrixserverlib
Go
< 0.0.0-20250116181547-c4f1e01eab0d
0.0.0-20250116181547-c4f1e01eab0d

References

Frequently Asked Questions

What is CVE-2024-52594?
CVE-2024-52594 is a security vulnerability in Github.com/matrix org/gomatrixserverlib involving Gomatrixserverlib Server-Side Request Forgery (SSRF) on redirects and federation under CWE-918: Server-Side Request Forgery (SSRF).
Which Github.com/matrix org/gomatrixserverlib versions are affected?
Affected versions include releases prior to 0.0.0-20250116181547-c4f1e01eab0d across affected packages: github.com/matrix-org/gomatrixserverlib.
What version fixes CVE-2024-52594?
Upgrading to 0.0.0-20250116181547-c4f1e01eab0d (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/matrix-org/gomatrixserverlib affected?
Yes, github.com/matrix-org/gomatrixserverlib is affected in releases prior to 0.0.0-20250116181547-c4f1e01eab0d. Upgrade your dependency to 0.0.0-20250116181547-c4f1e01eab0d or later.
What is the CVSS score of CVE-2024-52594?
CVE-2024-52594 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-52594?
CVE-2024-52594 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Go dependencies for CVE-2024-52594?
Run the dependency tree command: 'inspect dependencies for github.com/matrix-org/gomatrixserverlib'. 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-4ff6-858j-r822",
  "modified" : "2025-01-17T15:41:23Z",
  "published" : "2025-01-16T23:08:32Z",
  "aliases" : [ "CVE-2024-52594" ],
  "summary" : "Gomatrixserverlib Server-Side Request Forgery (SSRF) on redirects and federation",
  "details" : "### Impact\nGomatrixserverlib is vulnerable to server-side request forgery, serving content from a private network it can access, under certain conditions.\n\n### Patches\n\nc4f1e01eab0dd435709ad15463ed38a079ad6128 fixes this issue.\n\n\n### Workarounds\nUse a local firewall to limit the network segments and hosts the service using gomatrixserverlib can access.\n\n### References\nN/A\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/matrix-org/gomatrixserverlib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20250116181547-c4f1e01eab0d"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.0.0-20250106190028-bf86bc98b879"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/gomatrixserverlib/security/advisories/GHSA-4ff6-858j-r822"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52594"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/matrix-org/gomatrixserverlib/commit/c4f1e01eab0dd435709ad15463ed38a079ad6128"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/matrix-org/gomatrixserverlib"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3396"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-16T23:08:32Z",
    "nvd_published_at" : "2025-01-16T19:15:28Z"
  }
}