Open-source social network Mastodon has needed to address one high severity and two critical severity vulnerabilities affecting their platform and servers, as well as one moderate severity flaw. Security advisories released by Mastodon explain that these vulnerabilities were discovered by auditors at Cure53 during a code review they were completing on behalf of Mozilla.
The high severity vulnerability discovered is tracked as CVE-2023-36461, and has been assigned a CVSS base score of 7.5. An attacker can exploit this flaw to indefinitely extend the response time before timeout on individual read operations for outgoing HTTP queries on the server. This will result in a slowloris-type attack where all Mastodon workers are occupied for an extended period of time and the server becomes unresponsive.
The first critical severity flaw has a CVSS base score of 9.3 and is tracked as CVE-2023-36459. This vulnerability can be exploited through the use of oEmbed data crafted by the attackers which can bypass the HTML sanitisation checks and result in arbitrary HTML being included in oEmbed preview cards. This can be used as a cross-site scripting (XSS) vector for HTML payloads which will be rendered in the victim’s browser when a malicious preview card link is clicked.
The second critical severity flaw with an extremely high CVSS base score of 9.9/10 is CVE-2023-36460. This is the most severe of all the vulnerabilities found by Cure53 and has been given the name TootRoot by researchers tracking it. This vulnerability allows attackers to use crafted media files to manipulate the Mastodon media processing code to create files in arbitrary locations. This can also allow for any file Mastodon has access to to be overwritten, resulting in denial of service as well as remote code execution. An exploit of this vulnerability could result in the attackers gaining unlimited control over the server, with full access to the data it hosts and manages including sensitive user information.
The final flaw patched in these updates in a moderate severity flaw tracked as CVE-2023-36462 with a CVSS base score of 5.4. An attacker can exploit this flaw to create a verified profile link with formatting that obscures parts of the link. This results in the link appearing to link to a completely different URL than it actually does. Although once this link is clicked the actual link is revealed, attackers could still use the obscured links for phishing attacks.
These four vulnerabilities have all been patched in versions 3.5.9, 4.0.5, and 4.1.3, so all server administrators need to apply the latest security updates to apply these patches and protect their communities from these flaws.
“We were very impressed with the service, I will say, the vulnerability found was one our previous organisation had not picked up, which does make you wonder if anything else was missed.”
Aim Ltd Chief Technology Officer (CTO)