Federated invites from Synapse (and other servers) are rejected in v26.6.1 onwards #1971

Closed
opened 2026-07-12 14:04:39 +00:00 by nex · 9 comments
Owner

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):

  • Synapse (v1.161.0 and below)
  • Continuwuity (v26.6.0 and below)
  • Tuwunel (v1.7.1 and below)
  • Dendrite (all versions)
  • Conduit (v0.10.8 and below)

If someone is using one of the above servers and cannot send you an invite, you should inform them they should update their server.

Important

This is not a bug in Continuwuity - this issue is being opened for easier reference until the upstream issue is resolved.


Error messages to improve issue discoverability:

  • PDU in invite state (index 0) violates the room event format
  • PDU in invite state (index 1) violates the room event format
  • Invite state event is not a PDU
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): - Synapse (v1.161.0 and below) - Continuwuity (v26.6.0 and below) - Tuwunel (v1.7.1 and below) - Dendrite (all versions) - Conduit (v0.10.8 and below) If someone is using one of the above servers and cannot send you an invite, you should inform them they should update their server. > [!important] > **This is not a bug in Continuwuity** - this issue is being opened for easier reference until the upstream issue is resolved. --- Error messages to improve issue discoverability: - `PDU in invite state (index 0) violates the room event format` - `PDU in invite state (index 1) violates the room event format` - `Invite state event is not a PDU`
nex changed title from Invites from Synapse are rejected in v26.6.1 onwards to Federated invites from Synapse (and other servers) are rejected in v26.6.1 onwards 2026-08-09 14:46:51 +00:00

While 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)

While 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)
Contributor

@Phoenix616 wrote in #1971 (comment):

I get that this might slightly reduce security,

"Slightly" is a gross understatement. That's why there's no such fallback.

@Phoenix616 wrote in https://forgejo.ellis.link/continuwuation/continuwuity/issues/1971#issuecomment-35145: > I get that this might slightly reduce security, "Slightly" is a gross understatement. That's why there's no such fallback.
Contributor

IIRC the prior method allowed you to literally impersonate people or smth critical along those lines, not good!

IIRC the prior method allowed you to literally impersonate people or smth critical along those lines, not good!
Author
Owner

While 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

This is the standard approach across the ecosystem when there's an incompatibility between servers.

I am wondering why the capability of the sending server to send correctly formatted invites isn't part of the handling in continuwuity though.

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.

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.

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.

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.

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.

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

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 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 This is the standard approach across the ecosystem when there's an incompatibility between servers. > I am wondering why the capability of the sending server to send correctly formatted invites isn't part of the handling in continuwuity though. 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. > 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. 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. > 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. 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. > 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 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.

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](https://matrixrooms.info/stats)) 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](https://forgejo.ellis.link/continuwuation/continuwuity/pulls/2111) 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.
Owner

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.

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.
Author
Owner

I do not understand the political approach that is taken here to get the network to behave well with each other

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.

> I do not understand the political approach that is taken here to get the network to behave well with each other 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.
Owner

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.

We expect this issue to resolve with the release of Synapse 1.162.0. We understand matrix.org has deployed [the release candidate](https://github.com/element-hq/synapse/releases/tag/v1.162.0rc1) 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.
Member

Synapse has just cut release 1.162.0, so this issue should fade out as more deployments update.

Synapse has [just cut release 1.162.0](https://github.com/element-hq/synapse/releases/tag/v1.162.0), so this issue should fade out as more deployments update.
Sign in to join this conversation.
No milestone
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity#1971
No description provided.