{"answers":{"affected":"3 open source packages ship an affected version, including github.com/t2bot/matrix-media-repo. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-56515 in the wild and no public exploit code.","fix":"Upgrade github.com/t2bot/matrix-media-repo to 1.3.8 or later.","what":"CVE-2024-56515 is a medium-severity unsafe deserialization vulnerability in t2bot matrix-media-repo, published on 16 Jan 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-56515 and fix it if it is affected.\n\nWhat it is: CVE-2024-56515 is a medium-severity unsafe deserialization vulnerability in t2bot matrix-media-repo, published on 16 Jan 2025. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-56515 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/t2bot/matrix-media-repo (Go): affected all versions; fixed in 1.3.8\n- github.com/t2bot/matrix-media-repo (Go): affected all versions; fixed in 1.3.8\n- github.com/t2bot/matrix-media-repo (Go): affected all versions; fixed in 1.3.8\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-56515/ (Markdown: https://insights.sbomify.com/CVE-2024-56515/index.md)","id":"CVE-2024-56515","markdown":"https://insights.sbomify.com/CVE-2024-56515/index.md","name":"CVE-2024-56515","record":{"aliases":["GHSA-rcxc-wjgw-579r","GO-2025-3400"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Matrix media repository","requires_auth":"low_privilege","summary":"Attackers can trigger arbitrary code execution via malicious file uploads if specific thumbnailers are enabled, requiring an upgrade to Matrix Media Repo.","user_interaction":"required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"matrix-media-repo","vendor":"t2bot"}],"cvss":{"score":6.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"description":"Matrix Media Repo (MMR) is a highly configurable multi-homeserver media repository for Matrix. If SVG or JPEGXL thumbnailers are enabled (they are disabled by default), a user may upload a file which claims to be either of these types and request a thumbnail to invoke a different decoder in ImageMagick. In some ImageMagick installations, this includes the capability to run Ghostscript to decode the image/file. If MP4 thumbnailers are enabled (also disabled by default), the same issue as above may occur with the ffmpeg installation instead. MMR uses a number of other decoders for all other file types when preparing thumbnails. Theoretical issues are possible with these decoders, however in testing they were not possible to exploit. This is fixed in MMR v1.3.8. MMR now inspects the mimetype of media prior to thumbnailing, and picks a thumbnailer based on those results instead of relying on user-supplied values. This may lead to fewer thumbnails when obscure file shapes are used. This also helps narrow scope of theoretical issues with all decoders MMR uses for thumbnails. Users are advised to upgrade. Users unable to upgrade may disable the SVG, JPEGXL, and MP4 thumbnail types in the MMR config which prevents the decoders from being invoked. Further disabling uncommon file types on the server is recommended to limit risk surface. Containers and other similar technologies may also be used to limit the impact of vulnerabilities in external decoders, like ImageMagick and ffmpeg. Some installations of ImageMagick may disable \"unsafe\" file types, like PDFs, already. This option can be replicated to other environments as needed. ffmpeg may be compiled with limited decoders/codecs. The Docker image for MMR disables PDFs and similar formats by default.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Untrusted file formats can be thumbnailed, invoking potentially further untrusted decoders in Matrix Media Repo","id":"CVE-2024-56515","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"deserialization","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"free-one-api uses md5 for password storage","id":"CVE-2024-56516"},"packages":[{"ecosystem":"Go","fixed":["1.3.8"],"introduced":["0"],"last_affected":[],"package":"github.com/t2bot/matrix-media-repo","purl":null,"source":"GHSA-rcxc-wjgw-579r"},{"ecosystem":"Go","fixed":["1.3.8"],"introduced":["0"],"last_affected":[],"package":"github.com/t2bot/matrix-media-repo","purl":"pkg:golang/github.com/t2bot/matrix-media-repo","source":"GHSA-rcxc-wjgw-579r"},{"ecosystem":"Go","fixed":["1.3.8"],"introduced":["0"],"last_affected":[],"package":"github.com/t2bot/matrix-media-repo","purl":"pkg:golang/github.com/t2bot/matrix-media-repo","source":"GO-2025-3400"}],"prev":{"headline":"Karmada Tar Slips in CRDs archive extraction","id":"CVE-2024-56514"},"products":["matrix-media-repo"],"published":"2025-01-16","related":[{"cvss_score":5.3,"headline":"Unauthenticated writes to the media repository allow planting of problematic content in Matrix Media Repo","id":"CVE-2024-36402","kev_date_added":null,"published":"2025-01-16"},{"cvss_score":5.3,"headline":"Denial of service/high operating costs through unauthenticated downloads in Matrix Media Repo","id":"CVE-2024-36403","kev_date_added":null,"published":"2025-01-16"},{"cvss_score":5.3,"headline":"Denial of service through memory exhaustion in Matrix Media Repo","id":"CVE-2024-52791","kev_date_added":null,"published":"2025-01-16"},{"cvss_score":5,"headline":"Server-Side Request Forgery (SSRF) on redirects and federation in Matrix Media Repo","id":"CVE-2024-52602","kev_date_added":null,"published":"2025-01-16"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-12","vendors":["t2bot"]},"summary":"Attackers can trigger arbitrary code execution via malicious file uploads if specific thumbnailers are enabled, requiring an upgrade to Matrix Media Repo.","url":"https://insights.sbomify.com/CVE-2024-56515/"}