Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-42462

CVE-2026-42462: Fedify ActivityPub XSS Vulnerability

CVE-2026-42462 is an XSS vulnerability in Fedify, a TypeScript library for ActivityPub apps, allowing attackers to exploit JSON-LD features to alter signed activities. This post covers technical details, affected versions, and patches.

Published:

CVE-2026-42462 Overview

CVE-2026-42462 is a signature bypass vulnerability in Fedify, a TypeScript library for building federated server applications powered by ActivityPub. An attacker can exploit JSON-LD (JSON for Linking Data) processing features to restructure a signed document without invalidating its Linked Data Signature. This allows attackers to modify the semantic meaning of a third-party signed activity while keeping the signature cryptographically valid. The flaw affects all Fedify versions prior to 1.9.11, 1.10.10, 2.0.18, 2.1.14, and 2.2.3. The vulnerability is classified under [CWE-180] (Incorrect Behavior Order: Validate Before Canonicalize).

Critical Impact

Attackers can alter signed ActivityPub activities received from third parties without breaking their Linked Data Signatures, undermining the integrity of federated message exchange.

Affected Products

  • Fedify versions prior to 1.9.11 (1.9.x branch)
  • Fedify versions prior to 1.10.10, 2.0.18, and 2.1.14
  • Fedify versions prior to 2.2.3 (current branch)

Discovery Timeline

  • 2026-06-10 - CVE-2026-42462 published to NVD
  • 2026-06-10 - Last updated in NVD database

Technical Details for CVE-2026-42462

Vulnerability Analysis

Fedify implements Linked Data Signatures to verify the authenticity of ActivityPub activities exchanged between federated servers. The signature scheme depends on canonicalizing a JSON-LD document into a deterministic form before hashing and verifying. The vulnerability stems from inconsistencies between how the document is canonicalized for signature verification and how Fedify subsequently interprets the same document.

An attacker who receives a third-party signed activity can restructure the JSON-LD representation using legitimate JSON-LD features such as context manipulation, term aliasing, or property reordering. The restructured document produces the same canonical form during signature validation, so the signature still verifies successfully. However, Fedify's downstream consumption of the document interprets the altered structure differently, allowing the attacker to forge the apparent intent of the original signer.

Root Cause

The root cause is improper ordering of validation and canonicalization steps. Fedify validates the Linked Data Signature against one interpretation of the document while application logic acts on a different interpretation. Because JSON-LD permits multiple syntactic representations of the same semantic graph, any divergence between the verifier and the consumer creates a signature substitution surface.

Attack Vector

Exploitation requires the attacker to obtain a legitimately signed ActivityPub activity from a third-party actor. The attacker rewrites portions of the JSON-LD document, for example by introducing aliased terms or by relocating properties across nested objects, then relays the modified activity to a vulnerable Fedify server. The receiving server verifies the signature against the original signer's key, accepts the document as authentic, and processes the attacker-controlled interpretation. The attack is delivered over the network with no authentication or user interaction.

No public proof-of-concept code is available. Technical details are described in the GitHub Security Advisory GHSA-9rfg-v8g9-9367.

Detection Methods for CVE-2026-42462

Indicators of Compromise

  • Inbound ActivityPub activities whose JSON-LD @context definitions differ from the originating server's published context
  • Signed activities that contain unusual term aliases or property nesting compared to the signer's typical output
  • Federation log entries showing accepted activities that semantically contradict the apparent signer's prior behavior

Detection Strategies

  • Compare the raw received JSON-LD payload against the canonicalized form used for signature verification and alert on structural divergence
  • Log and review the full @context and term definitions of every signed inbound activity for anomalies
  • Cross-reference high-impact actions (follows, blocks, deletions, role changes) against the historical posting patterns of the signing actor

Monitoring Recommendations

  • Enable verbose logging of ActivityPub inbox processing and retain raw payloads for forensic comparison
  • Monitor Fedify dependency versions across all federated services and alert on instances running pre-patch releases
  • Track outbound complaints or reports from peer federated servers indicating spoofed activity attributed to local users

How to Mitigate CVE-2026-42462

Immediate Actions Required

  • Upgrade Fedify to 1.9.11, 1.10.10, 2.0.18, 2.1.14, or 2.2.3 depending on the deployed branch
  • Audit recent inbound federated activities for evidence of restructured JSON-LD payloads
  • Rotate any application secrets or tokens that may have been actioned via spoofed signed activities

Patch Information

The Fedify maintainers released fixes in versions 1.9.11, 1.10.10, 2.0.18, 2.1.14, and 2.2.3. The patches align canonicalization and consumption of JSON-LD documents so that signature verification reflects the structure Fedify actually acts upon. Release details are available in the GitHub Release 2.2.3 notes and the GitHub Security Advisory GHSA-9rfg-v8g9-9367.

Workarounds

  • No official workaround is documented; upgrading to a patched release is the recommended remediation
  • Operators unable to upgrade immediately should restrict federation to a vetted allowlist of trusted instances
  • Apply stricter validation of inbound @context documents and reject activities containing non-standard term aliases
bash
# Upgrade Fedify to a patched release using npm
npm install @fedify/fedify@2.2.3

# Or, for the 2.1.x branch
npm install @fedify/fedify@2.1.14

# Verify the installed version
npm ls @fedify/fedify

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.