Mastodon: SSRF Protection Bypass via IPv4-compatible IPv6 Addresses
10Vexday Risk Score
No sign of exploitation. No public exploitation artifact known so far.
ssvc Trackcvss 6.3
exploitation probability
—
observed exploitation
nono source reports it
Mastodon is a free, open-source social network server based on ActivityPub. Prior to 4.4.21, 4.5.14, 4.6.4, and 4.7.0-beta.1, PrivateAddressCheck.private_address? in app/lib/private_address_check.rb normalized IPv4-mapped IPv6 addresses but did not recognize IPv4-compatible IPv6 addresses with IPAddr#ipv4_compat?. An attacker could supply an address in the omitted range to bypass the ALLOWED_PRIVATE_ADDRESSES protection and make Mastodon send HTTP requests to loopback interfaces, potentially accessing private resources and services. Exploitation requires a system that supports the obsolete IPv4-compatible IPv6 mechanism. This issue is fixed in versions 4.4.21, 4.5.14, 4.6.4, and 4.7.0-beta.1.
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L
Affected products
mastodon · mastodonReferences
https://github.com/mastodon/mastodon/commit/18c61f286f1f5718a8f517940ba384866ffa3892https://github.com/mastodon/mastodon/commit/467c933459c7d0e5513475b9e4888afaedfb1074https://github.com/mastodon/mastodon/commit/930aa9fee26bf9eaefe27826fa1061288d83373bhttps://github.com/mastodon/mastodon/commit/da47a1bd3cd07935d7ca55a1f4f1a76f7f167e0dhttps://github.com/mastodon/mastodon/releases/tag/v4.4.21https://github.com/mastodon/mastodon/releases/tag/v4.5.14https://github.com/mastodon/mastodon/releases/tag/v4.6.4https://github.com/mastodon/mastodon/releases/tag/v4.7.0-beta.1https://github.com/mastodon/mastodon/security/advisories/GHSA-vwhj-3g83-v276