If you are running Mastodon 4.1, note that it only supports Ruby 3.0 (which is no longer supported upstream) and is subject to the above SAML security issue.
Mastodon 4.1 will no longer receive patches (including for security issues) after 2024-04-08 and we strongly encourage you to update to a newer Mastodon version.