Federated invites from Synapse (and other servers) are rejected in v26.6.1 onwards #1971
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Continuwuity/Web Interface
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#1971
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A year ago, Matrix introduced new validation rules for federated invites, to improve security. Versions prior to v26.6.1 did not enforce these, and also did not correctly send the new event format. As a result, invites from the following servers are now rejected, as they are sending malformed data (per these new rules):
If someone is using one of the above servers and cannot send you an invite, you should inform them they should update their server.
Error messages to improve issue discoverability:
PDU in invite state (index 0) violates the room event formatPDU in invite state (index 1) violates the room event formatInvite state event is not a PDUeleboucher referenced this issue2026-07-14 17:20:27 +00:00
Invites from Synapse are rejected in v26.6.1 onwardsto Federated invites from Synapse (and other servers) are rejected in v26.6.1 onwardsWhile I of course understand that updating other servers would be the preferred solution I feel like in the case of Synapse that's not really the approach which is fruitful with how that project seems to be run right now. And not being able to accept invites from it has been an issue from day one when I started hosting continuwuity myself a couple days ago.
I am wondering why the capability of the sending server to send correctly formatted invites isn't part of the handling in continuwuity though. I get that this might slightly reduce security, but it feels like a worthy tradeoff especially as the alternative is a loss of function with old implementations.
Of course my hope is that this gets resolved before a workaround is implemented but maybe it could be an approach on how to handle future protocol changes. (I'm honestly surprised there was no capability check approach used here during the transition period. Is that not something common with Matrix/this project? Matrix (nor rust or I would've just adjusted my server myself already) aren't my field of knowledge)
@Phoenix616 wrote in #1971 (comment):
"Slightly" is a gross understatement. That's why there's no such fallback.
IIRC the prior method allowed you to literally impersonate people or smth critical along those lines, not good!
This is the standard approach across the ecosystem when there's an incompatibility between servers.
Previously, invites were just four fields (event type, state key, sender, and content) - no signatures, hashes, timestamps, etc. There was no way to safely handle this data and for the longest time it was just assumed the remote server sending an invite wasn't evil. This allowed for several safety bypasses, including mechanisms that were used to prevent invites to illegal rooms, or from servers that deployments had defederated from.
The reduction is not only in security, but also safety. The loss of functionality in one implementation has been deemed acceptable, especially when that implementation already has a fix in the works. If we were to implement a workaround, by the time we got it pushed out into a release, and everyone had changed their configs to allow the workaround, the broken server will have already fixed it on their end, making the time and effort we'd have to put in to building the workaround utterly wasted. There are also now parts of the code that depend on receiving correctly formatted invites and there is code planned in the future that will use this new data format for further security enhancements - it'd be actively worsening our project to go back on this.
This change was actually meant to happen a year ago, continuwuity was just (very) late to the party. It seems, however, that Synapse is even later than we were.
The transition period ended 9 months ago (around the start of January 2026). Also, compatibility with existing servers was tested - refer to the comprehensive compatibility matrix in the issue description.
While I understand the security implications (hence the part about that in my original comment) I do not understand the political approach that is taken here to get the network to behave well with each other. Seeing as 77% of the network (according to this statistic site) is using a server implementation which does not adhere to the latest spec I feel like more should be done to deal with this. From my view a "transition period" has only ended when a significant amount (at least a majority) of the network actually is using the proposed spec change, simply pointing at a date in a document and saying "all the work is done now" will not magically make the problems go away. (Especially as work has stalled on implementing it in the main software used)
As far as I can tell good solutions have even been suggest before, I personally feel like better error messages would definitely help put political pressure on implementations that don't adhere to the latest spec (if anything it would help people like me get down to the root of this issue faster. Discovering this issue was a fluke as from the error message I suspected an issue in my new setup and with this software, not the other way around)
Another solution (which I personally would prefer as it does not result in a loss of functionality) would be to simply give the users a choice: They could've simply be warned and be able to choose to accept old, insecure invites if they arrive until the majority of the network supports the change. In certain situations (like happened to me) where you physically are next to the person inviting you and can verify the invite is legit this would allow you to still maintain the same kind of security and safety in my eyes as the new spec does via cryptographic means.
I think you're writing paragraphs of text at the wrong people. Element did not keep up with commitments that they have made. This is a volunteer project. We have explained our position.
The political approach is that this isn't our problem and that, frankly, I don't care. The bug in question is literally not even in our implementation, it couldn't be further from our problem. The fact that everyone seems to impose it on us is annoying, because if we have a bug that damages federation, it's our problem, and likewise if another (more popular) software has a bug that damages federation, it's still our problem. If someone wants me to ensure compatibility with enterprise software's quirks, they can write me an enterprise compatible contract with an enterprise compatible number.
Giving users a choice on security has historically been a moronic idea. I originally provided an alternate fork that allowed people to revert the behaviour, and it was deployed en masse with typically very little consideration despite the number of warnings I put on it. People constantly tell us we should prevent the user doing stupid things that may harm their server, and now people want us to not do that because they want to harm their server. I have decided the user doesn't know what they want so they will get what I decide. Again, enterprise size contracts welcome.
We expect this issue to resolve with the release of Synapse 1.162.0. We understand matrix.org has deployed the release candidate for this version, and we have started receiving invites from matrix.org users again as a result. Once released, "upgrade to Synapse 1.162.0 or newer" will be the formal resolution path for this issue.
Synapse has just cut release 1.162.0, so this issue should fade out as more deployments update.