Blog
Implementation
Implementing security labels in Matrix
Element’s Mission Partner Environment add-on for ESS Pro lets rooms and messages carry NATO-style security labels (STANAG 4774) that servers check against each reader’s clearance. A label is bound to each Matrix event in clear text, with a hash inside the ciphertext to detect tampering. Enforcement happens on the server, through Synapse Pro modules and a corrective bot, with a policy decision point such as OpenTDF making the decision.
Implementation
A faster, rustier Element Web
Element Web is moving onto the Matrix Rust SDK in small steps, by rebuilding the app as shared components that don’t depend on which SDK sits underneath. Using the MVVM pattern, switching SDKs means writing a new view model and leaving the UI alone. The post covers why the team rejected a full rewrite, what already ships this way and the Aurora proof of concept.
Deep dive
Exploring MatrixRTC: Real time communication in rooms
MatrixRTC is Matrix’s framework for putting real time applications, from voice and video calls to games and collaborative tools, directly into rooms. This post, from Element’s VoIP team’s FOSDEM 2026 talk, covers slots, sticky events, transports such as LiveKit SFUs and a MatrixRTC SDK, and shows two Godot multiplayer games built on it.
Deep dive
Analysis of reported issues in vodozemac
A blog post published on 2026-02-17 alleged a series of vulnerabilities in vodozemac, Matrix’s Rust cryptographic library. The Matrix.org Security Team confirms that the Olm 3DH code path does not reject all-zero X25519 outputs, and agrees to add that check as defence-in-depth, but disputes that it breaks confidentiality given Matrix’s authenticated key distribution. It also acknowledges the truncated 64-bit authentication tags in Olm v1 as a trade-off, and concludes that none of the reported issues is a practically exploitable vulnerability.
Deep dive
An Element Web for the future
Element Web’s early architecture became tightly coupled, with business logic inside UI components. Rather than rewrite it, the team is moving it piece by piece to shared, UI-first components built on a Model-View-ViewModel pattern, with newer tooling for development, documentation and visual testing. This is also meant to let the Rust SDK be integrated through WebAssembly without rewriting the interface.
Deep dive
Element Call: Redefining conferencing for privacy, scale and sovereignty
Element Call is built on MatrixRTC, a framework of applications, slots, membership, transports and sticky events layered on Matrix, with LiveKit as the media backend. It uses a multi-SFU design in which each homeserver runs its own SFU, with end-to-end encryption kept throughout, and a single standard VPS can host up to 500 participants. The post covers the user experience, how other clients can adopt Element Call through its widget, and what remains before it leaves beta.
Post-mortem
Post-mortem of the September 2 outage
On 2 September 2025 the matrix.org homeserver was unavailable for about 24 hours. During routine maintenance to add disk capacity, the primary database failed, and the secondary that replaced it was lost while restoring the original primary. Service came back after restoring the 51TB database from S3 storage, and no data was lost.
Implementation
Hiding room metadata from servers
Matrix stores the name, topic and other metadata of an encrypted room on the homeserver in plaintext, as state events. MSC3414 (Encrypted State Events) proposes encrypting the state events that are not critical for server operation, funnelling them through the existing message encryption. A proof of concept implemented across the Rust SDK, WASM SDK, JS SDK and Element Web does this with packed state keys, which hide the content of each event but still expose its type and state key to the server.
Implementation
Project Hydra: Improving state resolution in Matrix
Project Hydra is an ongoing exercise in improving the security of Matrix’s federation protocol, carried out under embargo by the backend team at Element, the Matrix.org Security Team and the Spec Core Team. Its changes, including State Resolution v2.1 and Room Version 12, resolve CVE-2025-49090 and CVE-2025-54315, and were shared with the maintainers of all known homeserver implementations for a coordinated release.
Post-mortem
How we discovered, and recovered from, Postgres corruption on the matrix.org homeserver
Parts of an index on one of the tables in the matrix.org homeserver’s PostgreSQL database had become corrupted; the authors believe this happened at least a year ago, and likely significantly longer. A background maintenance task that removes old, unreferenced data started working on the corrupted region and incorrectly removed active data, in effect corrupting rooms. They rebuilt the corrupted index and restored the removed data from database backups, but they are unsure exactly what caused the corruption.
Deep dive
Better authentication, session management and permissions in Matrix
Matrix 2.0 introduces OpenID Connect-native Matrix, implemented in matrix-authentication-service. It replaces Matrix access tokens with OAuth2 and OIDC ones, which the post says allows any authentication flow, token rotation and finer-grained permissions. Existing setups keep working, and existing sessions can be imported from Synapse.
Implementation
Testing faster remote room joins
As of Synapse 1.69, faster remote room joins are ready for testing by server admins. Joining a large room used to take upwards of 12 minutes for Matrix HQ, and now takes about 30 seconds, because a server can show basic room information first and populate the full state in the background. There are caveats, so it is not yet recommended for important production systems.
Deep dive
Type coverage for Sydent
In a two-week sprint, Sydent’s mypy precision went from 83% to 94% and the project now passes mypy --strict. Static typing would have caught the bytes-versus-strings bug that broke phone number verification in Sydent 2.4.0, though not the missing await, and the process showed how much a typechecker depends on the annotations of the libraries it checks against.
Deep dive
Adventures in fuzzing libolm
Overhauling libolm’s fuzzing setup uncovered bugs that had crept in since the library’s original audit in 2016: an invalid one-byte read in the base64 decoder and a server-controlled stack buffer overflow in olm_pk_decrypt, which affects Matrix clients supporting room key backup. The bugs were not easily exploitable, if at all, and have been fixed in libolm 3.2.3 and in the affected Element clients.
Deep dive
Low Bandwidth Matrix: An implementation guide
Matrix’s HTTP and JSON client-server API is slow, costly and poorly suited to low bandwidth links such as 2G networks. MSC3079 defines a low bandwidth protocol using CoAP and CBOR instead, and a proxy placed in front of any homeserver makes it MSC3079-compatible. Sending a single message takes 6 packets and 1440 bytes this way, against 43 packets and 6533 bytes over HTTP/2 with JSON.
Deep dive
How we hosted FOSDEM 2021 on Matrix
Matrix hosted the social side of FOSDEM 2021, a conference of roughly 30K attendees, using a horizontally scaled Synapse deployment, a Jitsi cluster, an elastic Jibri livestreaming cluster and a purpose-built conference bot. More than half of the 8,060 users actively joined to the public rooms were already on Matrix, and almost half of those who registered on the FOSDEM server used social login. Synapse endpoints that took more CPU than anticipated caused the most serious incident, and the team lists what it would change next time.
Implementation
How we fixed Synapse’s scalability!
Since Synapse 1.22, Synapse scales horizontally across multiple Python processes, and messages no longer need to flow through the main process. This came from moving writes off the main process, using Redis pub/sub between workers, and sharding the events stream across several event persisters with a vector clock of positions. On the Matrix.org homeserver, a second event persister brought send times down to 50ms or less for most messages and balanced CPU between the two workers.
Post-mortem
Post-mortem and remediations for Apr 11 security incident
An attacker exploited an out-of-date Jenkins server and then hijacked developers’ forwarded SSH keys to gain root on many hosts of the infrastructure behind the matrix.org homeserver. The post sets out the timeline, the rebuild of the infrastructure and the defacement of matrix.org, and says the Matrix protocol and the wider network were not involved. It lists the remediations: SSH hardening, network architecture, patching, intrusion detection, incident management and configuration management among them.
Deep dive
Breaking the 100bps barrier with Matrix, meshsim & coap-proxy
An experimental Matrix transport built on CoAP, CBOR, Noise, Flate and UDP can send a typical Matrix message in about 90 bytes, including Ethernet headers, which makes Matrix usable over networks of around 100 bits per second. That is roughly 65 times better than the equivalent HTTPS and JSON traffic, and it could shrink further with streaming compression and other changes. It is a proof of concept with homemade, unaudited encryption, and further work depends on finding a sponsor.
Implementation
Porting Synapse to Python 3
Synapse, the Matrix reference homeserver, has been ported to run on Python 3 as well as Python 2.7, in a subset of Python that works on both, so existing installs keep working. The post explains why the port was needed ahead of the end of Python 2 support in 2020 and reports lower memory use and some lower CPU use on matrix.org after the move. It says Python 2 support would end no earlier than 1 April 2019.