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

Medium 5.4 Published Updated

Users with sufficient trust levels can inject arbitrary HTML into topic pages via the DiscoTOC component, potentially leading to XSS attacks.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2022-39270?

CVE-2022-39270 is a medium-severity cross-site scripting vulnerability in discourse DiscoTOC, published on 6 Oct 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

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

Weakness: CWE-79

Which versions are affected by CVE-2022-39270?

It affects 1 product.

Products include Discourse Discotoc.

How do I fix CVE-2022-39270?

No fix has been published for CVE-2022-39270 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2022-39270 being exploited?

There is no known exploitation of CVE-2022-39270 in the wild and no public exploit code.

Sources

Also known as GHSA-m44p-w923-w32h.

Is CVE-2022-39270 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free