Skip to content

← Actionable
Medium, CVSS 4.1

matrix-media-repo: Unsafe media served inline on download endpoints

CVE-2023-41318GHSA-5crw-6j7v-xc72

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/turt2live/matrix-media-repo 1.3.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
4.1 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N
EPSS
  • CVE-2023-41318: 0.52% estimated exploitation activity in the next 30 days; percentile 44.01 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Impact A malicious user can upload an SVG image containing JavaScript to their server. When matrix-media-repo is asked to serve that media via the /matrix/media/(r0|v3)/download endpoint, it would be served with a Content-Disposition of inline. This can allow JavaScript to run in the browser if a client links to the /download endpoint directly. Server operators which do not share a domain between matrix-media-repo and other services are not affected, but are encouraged to upgrade regardless. Patches https://github.com/turt2live/matrix-media-repo/commit/77ec2354e8f46d5ef149d1dcaf25f51c04149137 and https://github.com/turt2live/matrix-media-repo/commit/bf8abdd7a5371118e280c65a8e0ec2b2e9bdaf59 fix the issue. Operators should upgrade to v1.3.0 as soon as possible. Workarounds The Content-Disposition header can be overridden by the reverse proxy in front of matrix-media-repo to always use attachment, defeating this issue at the cost of "worse" user experience when clicking download links.…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-5crw-6j7v-xc72

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2023-41318

Advisory: matrix-media-repo: Unsafe media served inline on download endpoints
IDs: CVE-2023-41318, GHSA-5crw-6j7v-xc72
Record: https://patchnext.com/advisories/cve-2023-41318 (revision 1, source checked 26 Oct 2026, 15:00 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 4.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: github.com/turt2live/matrix-media-repo 1.3.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/turt2live/matrix-media-repo: affected < 1.3.0; fixed in 1.3.0

## Suggested inspection (read-only)
- Go github.com/turt2live/matrix-media-repo: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/turt2live/matrix-media-repo.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-5crw-6j7v-xc72 (GitHub-reviewed advisory GHSA-5crw-6j7v-xc72 lists affected ranges: Go github.com/turt2live/matrix-media-repo >=0 <1.3.0)

Commands are suggestions: review each one before running it.

Loading voting…