Server Side Request Forgery (SSRF) attack in Fedify
Published Jul 5, 2024 · Updated Nov 3, 2026
Original summary
Normalized public record · Updated Nov 3, 2026
Server Side Request Forgery (SSRF) attack in Fedify
Publisher and source text is retained separately from QFinch interpretation.
QFinch assessment
At present, when Fedify needs to retrieve an object or activity from a remote activitypub server, it makes a HTTP request to the @id or other resources present within the activity it has received from the web. This activity could reference an @id that points to an internal IP address, allowing an attacker to send request to resources internal to the fedify server's network. This applies to not just resolution of documents containing activities or objects, but also to media URLs as well. Specifically this is a Server Side Request Forgery attack. You can learn more about SSRF attacks via CWE-918
Potential impact
This impacts server operates, as resources that are internal to their network may find themselves being improperly accessed or potentially even attacked or exposed to the public.
Technical context
When Fedify makes a request at runtime via the DocLoader [1] [2], the fetch API does not first check the URI's to assert that it resolve to a public IP address. Additionally, any downstream software of Fedify that may fetch data from URIs contained within Activities or Objects maybe be at risk of requesting non-public resources, and storing those, exposing non-public information to the public. Additionally, in many cases the URIs are not asserted to be either strictly HTTPS or HTTP protocols, which could lead to further attacks, and there is no check that the URI contains a hostname part. Whilst the fetch() specification may provide some safety here, along with underlying fetch implementations, there is still potential for attacks through using data: URIs, or just attacking some other protocol entirely, e.g., FTP or CalDav. [1] https://github.com/dahlia/fedify/blob/main/runtime/docloader.tsL141 [2] https://github.com/dahlia/fedify/blob/main/runtime/docloader.tsL175 Deno-specific Attack Vectors In Deno specifically, the fetch() API allows accessing local filesystem, I'm not sure how Deno's Permissions model may prevent attacks utilising file: URIs. > Fetch also supports fetching from file URLs to retrieve static files. For more info on static files, see the filesystem API documentation. ActivityPub Security Considerations This is also noted in the ActivityPub spec in Section B.3 Security Considerations, however, there it is more limited in scope. Other Implementations It may be acceptable to allow a server operator to allow access to given non-public IP addresses, for instance in Mastodon they allow requests to non-public IP addresses, i.e., localhost in development and those in the ALLOWEDPRIVATEADDRESSES environment variable.
Evidence: public source recordsAffected products
| Affected package, product or range | Fix status |
|---|---|
| Consult the referenced vendor advisory for affected versions. | Consult source advisory |
Matching a version is only one part of assessing exposure. QFinch has not assessed your environment on this public page.
Remediation
Apply the vendor-supported fixed release or mitigation, then verify the affected component is no longer reachable.
- Confirm the affected product and reachable code path exist in your environment.
- Apply the vendor-supported patch or mitigation from the primary advisory.
- Rescan the exact deployed revision and retain verification evidence.
Evidence coverage
- SSVC priority
- MEDIUM
- Confidence
- Not available
- Aliases
- None reported
Scores appear only when corresponding evidence exists. Missing data is never interpreted as zero risk.
Sources and record history
Record history
Published Jul 5, 2024 · Last refreshed Nov 3, 2026