# CVE-2023-41318: Unsafe media served inline on download endpoints in matrix-media-repo

- Severity: Medium 4.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-02)
- Published: 2023-09-08T13:18:23.000Z
- Modified: 2026-09-10T03:49:57.874Z
- Also known as: GHSA-5crw-6j7v-xc72, GO-2023-2053
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

matrix-media-repo is a highly customizable multi-domain media repository for the Matrix chat ecosystem. In affected versions an attacker could upload a malicious piece of media to the media repo, which would then be served with `Content-Disposition: inline` upon download. This vulnerability could be leveraged to execute scripts embedded in SVG content. Commits `77ec235` and `bf8abdd` fix the issue and are included in the 1.3.0 release. Operators should upgrade to v1.3.0 as soon as possible. Operators unable to upgrade should override the `Content-Disposition` header returned by matrix-media-repo as a workaround.

(As written by CVE List.)

## Affected

- turt2live matrix-media-repo: < 1.3.0; before 1.3.0
- github.com/turt2live/matrix-media-repo (Go): before 1.3.0

## Every score

- GitHub_M: CVSS:3.1 4.1 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N`
- GitHub: CVSS:3.1 4.1 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/turt2live/matrix-media-repo/security/advisories/GHSA-5crw-6j7v-xc72> (advisory, vendor-advisory, web)
- <https://github.com/turt2live/matrix-media-repo/commit/77ec2354e8f46d5ef149d1dcaf25f51c04149137> (fix, patch, web)
- <https://github.com/turt2live/matrix-media-repo/commit/bf8abdd7a5371118e280c65a8e0ec2b2e9bdaf59> (fix, patch, web)
- <https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-41318> (advisory)
- <https://github.com/turt2live/matrix-media-repo> (package)

## Sources

- CVE List: [CVE-2023-41318](https://www.cve.org/CVERecord?id=CVE-2023-41318), CVE Terms of Use, modified 2024-09-26
- GitHub Advisory Database: [GHSA-5crw-6j7v-xc72](https://github.com/advisories/GHSA-5crw-6j7v-xc72), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2023-2053](https://pkg.go.dev/vuln/GO-2023-2053), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2023-41318](https://nvd.nist.gov/vuln/detail/CVE-2023-41318), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-41318 · Whole record: https://cve.day/CVE-2023-41318.json · Rebuilt by cve.day 2026-11-25T22:58:27.771Z
