Compare commits

...
Author SHA1 Message Date
Ginger 6957ff7689 chore: Release 2026-08-11 17:38:12 -04:00
Ginger a460c4266c chore: Update changelog 2026-08-11 17:37:32 -04:00
Ginger 700fbe472d fix: SEC26
Reviewed-By: timedout <git@nexy7574.co.uk>
Reviewed-By: Ginger <ginger@gingershaped.computer>
2026-08-11 17:35:29 -04:00
Ginger 49a8f6f53b fix: SEC28 2026-08-11 17:35:29 -04:00
8 changed files with 60 additions and 31 deletions

No files matched your search

+8
View File
@@ -1,3 +1,11 @@
# Continuwuity 26.7.3 (2026-08-11)
## Bugfixes
- Fixed a vulnerability that enabled the server to leak certain events over federation. Contributed by @eleboucher. (SEC26)
- Fixed an issue that allowed an attacker to take over another account on the same server under certain conditions. ([GHSA-v2x6-m99h-vqxx](https://github.com/continuwuity/continuwuity/security/advisories/GHSA-v2x6-m99h-vqxx)) Contributed by @gingershaped and reported by GlitchedAxiom. (SEC28)
# Continuwuity 26.7.0 (2026-07-27) # Continuwuity 26.7.0 (2026-07-27)
## Features ## Features
Generated
+12 -12
View File
@@ -816,7 +816,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit" name = "conduwuit"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"aws-lc-rs", "aws-lc-rs",
"clap", "clap",
@@ -854,7 +854,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_admin" name = "conduwuit_admin"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"assign", "assign",
"clap", "clap",
@@ -880,7 +880,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_api" name = "conduwuit_api"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"assign", "assign",
"async-trait", "async-trait",
@@ -918,7 +918,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_build_metadata" name = "conduwuit_build_metadata"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"built", "built",
"cargo_metadata", "cargo_metadata",
@@ -926,7 +926,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_core" name = "conduwuit_core"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"argon2", "argon2",
"arrayvec", "arrayvec",
@@ -994,7 +994,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_database" name = "conduwuit_database"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"async-channel", "async-channel",
"conduwuit_core", "conduwuit_core",
@@ -1015,7 +1015,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_macros" name = "conduwuit_macros"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"cargo_toml", "cargo_toml",
"itertools 0.15.0", "itertools 0.15.0",
@@ -1026,7 +1026,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_router" name = "conduwuit_router"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"assign", "assign",
"axum", "axum",
@@ -1063,7 +1063,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_service" name = "conduwuit_service"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"askama", "askama",
"assign", "assign",
@@ -1115,7 +1115,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_web" name = "conduwuit_web"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"askama", "askama",
"assign", "assign",
@@ -4765,7 +4765,7 @@ dependencies = [
[[package]] [[package]]
name = "ruminuwuity" name = "ruminuwuity"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"assign", "assign",
"ruma", "ruma",
@@ -6874,7 +6874,7 @@ dependencies = [
[[package]] [[package]]
name = "xtask" name = "xtask"
version = "26.7.2" version = "26.7.3"
dependencies = [ dependencies = [
"askama", "askama",
"cargo_metadata", "cargo_metadata",
+1 -1
View File
@@ -12,7 +12,7 @@ license = "Apache-2.0"
# See also `rust-toolchain.toml` # See also `rust-toolchain.toml`
readme = "README.md" readme = "README.md"
repository = "https://forgejo.ellis.link/continuwuation/continuwuity" repository = "https://forgejo.ellis.link/continuwuation/continuwuity"
version = "26.7.2" version = "26.7.3"
[workspace.metadata.crane] [workspace.metadata.crane]
name = "conduwuit" name = "conduwuit"
-1
View File
@@ -1 +0,0 @@
**TODO - embargoed until next release** (maintainers see security issue 10 when writing rls notes). Contributed by @eleboucher.
+10 -14
View File
@@ -1,9 +1,9 @@
use std::{borrow::Borrow, iter::once}; use std::{borrow::Borrow, iter::once};
use axum::extract::State; use axum::extract::State;
use conduwuit::{Err, Error, Result, err, info, utils::stream::ReadyExt}; use conduwuit::{Err, Event, Result, info, utils::stream::ReadyExt};
use futures::StreamExt; use futures::StreamExt;
use ruma::{RoomId, api::federation::authorization::get_event_authorization}; use ruma::api::federation::authorization::get_event_authorization;
use super::AccessCheck; use super::AccessCheck;
use crate::Ruma; use crate::Ruma;
@@ -48,25 +48,21 @@ pub(crate) async fn get_event_authorization_route(
return Err!(Request(NotFound("This server is not participating in that room."))); return Err!(Request(NotFound("This server is not participating in that room.")));
} }
let event = services // The event must be in the room we just authorised access to
if !services
.rooms .rooms
.timeline .timeline
.get_pdu_json(&body.event_id) .get_pdu(&body.event_id)
.await .await
.map_err(|_| err!(Request(NotFound("Event not found."))))?; .is_ok_and(|pdu| pdu.room_id_or_hash() == body.room_id)
{
let room_id_str = event return Err!(Request(NotFound("Event not found.")));
.get("room_id") }
.and_then(|val| val.as_str())
.ok_or_else(|| Error::bad_database("Invalid event in database."))?;
let room_id = <&RoomId>::try_from(room_id_str)
.map_err(|_| Error::bad_database("Invalid room_id in event in database."))?;
let auth_chain = services let auth_chain = services
.rooms .rooms
.auth_chain .auth_chain
.event_ids_iter(room_id, once(body.event_id.borrow())) .event_ids_iter(&body.room_id, once(body.event_id.borrow()))
.ready_filter_map(Result::ok) .ready_filter_map(Result::ok)
.filter_map(|id| async move { services.rooms.timeline.get_pdu_json(&id).await.ok() }) .filter_map(|id| async move { services.rooms.timeline.get_pdu_json(&id).await.ok() })
.then(|pdu| services.sending.convert_to_outgoing_federation_event(pdu)) .then(|pdu| services.sending.convert_to_outgoing_federation_event(pdu))
+12 -1
View File
@@ -1,7 +1,7 @@
use std::{borrow::Borrow, iter::once}; use std::{borrow::Borrow, iter::once};
use axum::extract::State; use axum::extract::State;
use conduwuit::{Err, Result, at, err, info, utils::IterStream}; use conduwuit::{Err, Event, Result, at, err, info, utils::IterStream};
use futures::{FutureExt, StreamExt, TryStreamExt}; use futures::{FutureExt, StreamExt, TryStreamExt};
use ruma::{OwnedEventId, api::federation::event::get_room_state}; use ruma::{OwnedEventId, api::federation::event::get_room_state};
@@ -24,6 +24,17 @@ pub(crate) async fn get_room_state_route(
.assert() .assert()
.await?; .await?;
// The event must be in the room we just authorised access to
if !services
.rooms
.timeline
.get_pdu(&body.event_id)
.await
.is_ok_and(|pdu| pdu.room_id_or_hash() == body.room_id)
{
return Err!(Request(NotFound("Event not found.")));
}
if services if services
.rooms .rooms
.pdu_metadata .pdu_metadata
+12 -1
View File
@@ -1,7 +1,7 @@
use std::{borrow::Borrow, iter::once}; use std::{borrow::Borrow, iter::once};
use axum::extract::State; use axum::extract::State;
use conduwuit::{Err, Result, at, err, info}; use conduwuit::{Err, Event, Result, at, err, info};
use futures::{StreamExt, TryStreamExt}; use futures::{StreamExt, TryStreamExt};
use ruma::{OwnedEventId, api::federation::event::get_room_state_ids}; use ruma::{OwnedEventId, api::federation::event::get_room_state_ids};
@@ -25,6 +25,17 @@ pub(crate) async fn get_room_state_ids_route(
.assert() .assert()
.await?; .await?;
// The event must be in the room we just authorised access to
if !services
.rooms
.timeline
.get_pdu(&body.event_id)
.await
.is_ok_and(|pdu| pdu.room_id_or_hash() == body.room_id)
{
return Err!(Request(NotFound("Event not found.")));
}
if services if services
.rooms .rooms
.pdu_metadata .pdu_metadata
+5 -1
View File
@@ -127,6 +127,10 @@ impl Service {
// If a validation session already exists for this client secret, we can either // If a validation session already exists for this client secret, we can either
// reuse it with a new token or return early because it's already valid. // reuse it with a new token or return early because it's already valid.
| Some(session) => { | Some(session) => {
if session.email != recipient.email {
return Err!(Request(InvalidParam("Wrong email for session.")));
}
match session.validation_state { match session.validation_state {
| ValidationState::Validated => { | ValidationState::Validated => {
// If the existing session is already valid, don't send an email. // If the existing session is already valid, don't send an email.
@@ -134,7 +138,7 @@ impl Service {
}, },
| ValidationState::Pending(ref mut token) => { | ValidationState::Pending(ref mut token) => {
// Check ratelimiting for the target address. // Check ratelimiting for the target address.
if self.ratelimiter.check_key(&recipient.email).is_err() { if self.ratelimiter.check_key(&session.email).is_err() {
return Err(Error::BadRequest( return Err(Error::BadRequest(
ErrorKind::LimitExceeded(LimitExceededErrorData::new()), ErrorKind::LimitExceeded(LimitExceededErrorData::new()),
"You're sending emails too fast, try again in a few minutes.", "You're sending emails too fast, try again in a few minutes.",