CVE-2023-36459 Mastodon vulnerable to Cross-site Scripting through oEmbed preview cards

Critical 9.3 Published Updated

Attackers can inject arbitrary HTML into oEmbed preview cards, leading to cross-site scripting when users click malicious links.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-36459?

CVE-2023-36459 is a critical cross-site scripting vulnerability in mastodon, published on 6 Jul 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Mastodon is a free, open-source social network server based on ActivityPub. Starting in version 1.3 and prior to versions 3.5.9, 4.0.5, and 4.1.3, an attacker using carefully crafted oEmbed data can bypass the HTML sanitization performed by Mastodon and include arbitrary HTML in oEmbed preview cards. This introduces a vector for cross-site scripting (XSS) payloads that can be rendered in the user's browser when a preview card for a malicious link is clicked through. Versions 3.5.9, 4.0.5, and 4.1.3 contain a patch for this issue.

Weakness: CWE-79

Which versions are affected by CVE-2023-36459?

1 open source package ship an affected version, including mastodon. It affects 1 product.

PackageAffectedFixed in
mastodon BitnamiFrom 1.3.03.5.9, 4.0.5, 4.1.3

Products include Joinmastodon Mastodon.

How do I fix CVE-2023-36459?

Upgrade mastodon to a fixed version for your release line: 3.5.9, 4.0.5 or 4.1.3.

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-2023-36459 being exploited?

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

Sources

Also known as BIT-mastodon-2023-36459, GHSA-ccm4-vgcc-73hp.

Is CVE-2023-36459 in your software?

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

Check your SBOMs for free