Cross-site scriptingin mastodon.
No public exploit found; not on exploited lists.
Mastodon is a free, open-source social network server based on ActivityPub. In versions on the 4.x branch prior to versions 4.0.10, 4.2.8, and 4.2.0-rc2, under certain conditions, attackers can abuse the translation feature to bypass the server-side HTML sanitization, allowing unescaped HTML to execute in the browser. The impact is limited thanks to Mastodon's strict Content Security Policy, blocking inline scripts, etc. However a CSP bypass or loophole could be exploited to execute malicious XSS. Furthermore, it requires user interaction, as this can only occur upon clicking the “Translate” button on a malicious post. Versions 4.0.10, 4.2.8, and 4.2.0-rc2 contain a patch for this issue.
- Upgrade mastodon to 4.0.10, 4.1.8, 4.2.0-rc2 or later, whichever matches your release line.
Affected and fixed versions
From the CVE record, NVD and package advisories. When no source has versions yet, this table says "not confirmed" instead of guessing.
From first report to first attacks
- 8 Sep 2023CVE ID reserved by GitHub_M.
- 19 Sep 2023Published in the CVE List.
- 24 Sep 2024CVE record last updated.
Attack code anyone can find
Exploit maturity: No public exploit found. CISA assessment (SSVC): exploitation none.
Listed so defenders can judge how urgent this is and test systems they are authorised to test. Patchminder does not host exploit code; links open the source page. Labels for GitHub repositories come from their public details and are never a promise about the code. Run anything only in an isolated lab.
Report a link
Nothing on this page links to exploit code right now. To report anything else, write to the contact point in the legal notice.
Other mastodon vulnerabilities
Same weakness: Cross-site scripting
- github.com x_refsource_CONFIRM
- github.com x_refsource_MISC
Patchminder. CVE-2023-42452: Cross-site scripting in mastodon. https://patchminder.com/cve/cve-2023-42452/ (accessed 5 December 2026).