CVE-2023-36460 Mastodon vulnerable to arbitrary file creation through media attachments

Critical 10.0 Published Updated

Attackers can create or overwrite arbitrary files via crafted media attachments, leading to remote code execution or denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-36460?

CVE-2023-36460 is a critical path traversal vulnerability in mastodon, published on 6 Jul 2023. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Mastodon is a free, open-source social network server based on ActivityPub. Starting in version 3.5.0 and prior to versions 3.5.9, 4.0.5, and 4.1.3, attackers using carefully crafted media files can cause Mastodon's media processing code to create arbitrary files at any location. This allows attackers to create and overwrite any file Mastodon has access to, allowing Denial of Service and arbitrary Remote Code Execution. Versions 3.5.9, 4.0.5, and 4.1.3 contain a patch for this issue.

Weakness: CWE-22

Which versions are affected by CVE-2023-36460?

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

PackageAffectedFixed in
mastodon BitnamiFrom 3.5.03.5.9, 4.0.5, 4.1.3

Products include Joinmastodon Mastodon.

How do I fix CVE-2023-36460?

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

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2023-36460 being exploited?

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

Sources

Also known as BIT-mastodon-2023-36460, GHSA-9928-3cp5-93fm.

Is CVE-2023-36460 in your software?

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

Check your SBOMs for free