What’s Vulnerable › Vulnerabilities
CVE-2022-39270: Arbitrary HTML injection in table-of-contents theme component in DiscoTOC
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-10-06 · updated 2026-06-17
- Weakness: CWE-79
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.
Affected products
- discourse DiscoTOC: before 2.1.0 — fixed in 2.1.0
How to fix
Upgrade to a fixed version: discourse DiscoTOC 2.1.0. Check the vendor advisory for mitigations.
References
- https://github.com/discourse/DiscoTOC/commit/f80c215a283cd045d2a371403e6eba88b2911192
- https://github.com/discourse/DiscoTOC/security/advisories/GHSA-m44p-w923-w32h
- https://github.com/discourse/DiscoTOC/commit/f80c215a283cd045d2a371403e6eba88b2911192
- https://github.com/discourse/DiscoTOC/security/advisories/GHSA-m44p-w923-w32h
Get alerted when CVE-2022-39270 or the next vulnerability affects your stack