{"id":"CVE-2023-41318","summary":"Unsafe media served inline on download endpoints in matrix-media-repo","details":"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.","aliases":["GHSA-5crw-6j7v-xc72","GO-2023-2053"],"modified":"2026-05-28T03:53:41.797008983Z","published":"2023-09-08T19:51:20.011Z","database_specific":{"cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41318.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41318.json"},{"type":"ADVISORY","url":"https://github.com/turt2live/matrix-media-repo/security/advisories/GHSA-5crw-6j7v-xc72"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-41318"},{"type":"FIX","url":"https://github.com/turt2live/matrix-media-repo/commit/77ec2354e8f46d5ef149d1dcaf25f51c04149137"},{"type":"FIX","url":"https://github.com/turt2live/matrix-media-repo/commit/bf8abdd7a5371118e280c65a8e0ec2b2e9bdaf59"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/t2bot/matrix-media-repo","events":[{"introduced":"0"},{"fixed":"47a6cccb27653cd85f9537d6e825cf2aad5b1087"}]}],"versions":["v1.2.13","v1.2.12","v1.2.11","v1.2.10","v1.2.9","v1.2.7","v1.2.6","v1.2.5","v1.2.4","v1.2.3","v1.2.2","v1.2.1","v1.2.0","v1.1.3","v1.1.2","v1.1.1","v1.1.0","v1.0.1","v1.0.0","v1.0.0-rc.2","v1.0.0-rc.1"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-41318.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N"}]}