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

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 44% of CVEs (2026-12-01)
- Published: 2022-10-06T00:00:00.000Z
- Modified: 2026-06-17T04:58:02.530Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- discourse DiscoTOC: < 2.1.0; before 2.1.0

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/discourse/DiscoTOC/security/advisories/GHSA-m44p-w923-w32h> (third-party-advisory)
- <https://github.com/discourse/DiscoTOC/commit/f80c215a283cd045d2a371403e6eba88b2911192> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2022-39270](https://www.cve.org/CVERecord?id=CVE-2022-39270), CVE Terms of Use, modified 2025-04-23
- NVD: [CVE-2022-39270](https://nvd.nist.gov/vuln/detail/CVE-2022-39270), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-39270 · Whole record: https://cve.day/CVE-2022-39270.json · Rebuilt by cve.day 2026-11-25T22:58:15.430Z
