Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go

GHSA-5crw-6j7v-xc72

MEDIUM

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

Also known asCVE-2023-41318GO-2023-2053
Published
Sep 8, 2023
Updated
Aug 21, 2024
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk34th percentile-0.07%
0.00%0.33%0.67%1.00%0.5%0.4%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected
🐹github.com/turt2live/matrix-media-repo

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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.

References

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/turt2live/matrix-media-repoall versions1.3.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/turt2live/matrix-media-repo. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update github.com/turt2live/matrix-media-repo to 1.3.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5crw-6j7v-xc72 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-5crw-6j7v-xc72 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-5crw-6j7v-xc72. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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/77ec2354e8f46d5ef149d1
O3 Security · Impact-Aware SCA

Is GHSA-5crw-6j7v-xc72 in your dependencies?

O3 detects GHSA-5crw-6j7v-xc72 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.