# CVE-2025-23221: Fedify has an Infinite loop and Blind SSRF found inside the Webfinger mechanism

> Attackers can trigger infinite loops causing denial of service and perform blind SSRF attacks via the Webfinger mechanism in Fedify.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Jan 2025
- **Updated:** 21 Jan 2025
- **Also known as:** GHSA-c59p-wq67-24wx

## What is CVE-2025-23221?

CVE-2025-23221 is a medium-severity server-side request forgery vulnerability in dahlia fedify, published on 20 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Fedify is a TypeScript library for building federated server apps powered by ActivityPub and other standards. This vulnerability allows a user to maneuver the Webfinger mechanism to perform a GET request to any internal resource on any Host, Port, URL combination regardless of present security mechanisms, and forcing the victim’s server into an infinite loop causing Denial of Service. Moreover, this issue can also be maneuvered into performing a Blind SSRF attack. This vulnerability is fixed in 1.0.14, 1.1.11, 1.2.11, and 1.3.4.

Weakness: CWE-918 (Server-Side Request Forgery), CWE-835 (Loop with Unreachable Exit Condition)

## Which versions are affected by CVE-2025-23221?

8 open source packages ship an affected version, including @fedify/fedify.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@fedify/fedify` | npm | From 1.0.13 | 1.0.14 |
| `@fedify/fedify` | npm | From 1.0.13 | 1.0.14 |
| `@fedify/fedify` | npm | From 1.1.10 | 1.1.11 |
| `@fedify/fedify` | npm | From 1.1.10 | 1.1.11 |
| `@fedify/fedify` | npm | From 1.2.10 | 1.2.11 |
| `@fedify/fedify` | npm | From 1.2.10 | 1.2.11 |
| `@fedify/fedify` | npm | From 1.3.3 | 1.3.4 |
| `@fedify/fedify` | npm | From 1.3.3 | 1.3.4 |

## How do I fix CVE-2025-23221?

Upgrade @fedify/fedify to a fixed version for your release line: 1.0.14, 1.1.11, 1.2.11 or 1.3.4.

## Is CVE-2025-23221 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-23221 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-23221 and fix it if it is affected.

What it is: CVE-2025-23221 is a medium-severity server-side request forgery vulnerability in dahlia fedify, published on 20 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-23221 exists.

Affected packages and fixed versions:
- @fedify/fedify (npm): affected from 1.0.13; fixed in 1.0.14
- @fedify/fedify (npm): affected from 1.0.13; fixed in 1.0.14
- @fedify/fedify (npm): affected from 1.1.10; fixed in 1.1.11
- @fedify/fedify (npm): affected from 1.1.10; fixed in 1.1.11
- @fedify/fedify (npm): affected from 1.2.10; fixed in 1.2.11
- @fedify/fedify (npm): affected from 1.2.10; fixed in 1.2.11
- @fedify/fedify (npm): affected from 1.3.3; fixed in 1.3.4
- @fedify/fedify (npm): affected from 1.3.3; fixed in 1.3.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-23221/ (Markdown: https://insights.sbomify.com/CVE-2025-23221/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-23221
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-23221
- OSV: https://osv.dev/vulnerability/CVE-2025-23221

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-23221/
Summaries are generated and may contain mistakes; the official description above is the record.
