Modoboa 2.9.0 shipped commit a1878c49 to close CVE-2026-56780 on PUT /api/v1/accounts/{pk}/password/, while NIST NVD left its CVSS score blank and FIRST EPSS sat at 0.46%.
Twenty lines higher in modoboa/admin/api/v1/viewsets.py, AccountViewSet.reset_password and exists still queried core_models.User.objects across every tenant through 2.11.1, and five custom POST routes in v2 evaluated DjangoModelPermissions against add_* instead of delete or change capabilities until 2.12.0 (commit 9ff8d736).
When an on-call responder investigates a compromised reseller or domain-admin credential on a Modoboa mail platform, automated feeds offer three false clears at the same time. NIST NVD holds null for cvss_nvd on CVE-2026-56780 while VulnCheck CNA holds 7.7 (CVSS 4.0) and 7.5 (CVSS 3.1, CWE-639). FIRST EPSS sits at 0.00455 (0.46%) because authenticated tenant escapes (PR:L) do not spray internet honeypots. And dependency scanners report every host at 2.9.0 or higher as remediated.
I am not claiming intent. I am describing structure. Commit a1878c4920a6e47c3217c6ff1ed4a8753c202661 (PR #4038, Modoboa 2.9.0) fixed PUT /api/v1/accounts/{pk}/password/ by replacing a direct lookup with self.get_object(), which routes through AccountViewSet.get_queryset() to enforce domain ownership.
In that same class (modoboa/admin/api/v1/viewsets.py, inherited by v2.AccountViewSet), two sibling @action methods bypassed self.get_queryset() through Modoboa 2.11.1 (vciy-2026-0005). AccountViewSet.exists (lines 145-162) called core_models.User.objects.filter(email=email).exists(), and AccountViewSet.reset_password (lines 164-191) called core_models.User.objects.filter(email=serializer.validated_data["email"]).first() against the global user table. Wiring a tenant badge check onto the lobby elevator leaves the top floor exposed if the stairwell next to it opens for any visitor card.
One method filtered by tenant. Two queried the whole table.
Reaching those unscoped queries from a delegated role required a second framework seam inside Django REST Framework. DjangoModelPermissions.perms_map keys strictly on HTTP verb: POST checks %(app_label)s.add_%(model_name)s, PUT checks change_, and DELETE checks delete_.
Every DomainAdmin holds core.add_user to create mailboxes inside assigned domains, and every Reseller holds admin.add_domain. Because reset_password is decorated with @action(methods=["post"], detail=False), DRF checked core.add_user and admitted any DomainAdmin. On instances with sms_password_recovery enabled in core_localconfig, a POST to /api/v2/accounts/reset_password/ naming a SuperAdmin email resolved the global superuser row and overwrote its password hash.
That identical POST mapping left five v2 administrative actions under-protected until PR #4340 (commit 9ff8d7368ff77b0fcff19ff011cb746a30fc9b1b, Modoboa 2.12.0). v2.DomainViewSet.get_permissions (v2/viewsets.py:94-108) overrode bulk_delete and generate_dkim_key while omitting custom POST actions delete, add_administrator, and remove_administrator, falling back to admin.add_domain instead of CanDeleteDomain or CanChangeDomain. v2.AccountViewSet (lines 338-380) omitted get_permissions() overrides on delete and bulk_delete, checking core.add_user instead of CanDeleteUser.
HTTP verbs do not name administrative capabilities.
Save as verify.rs and run rustc --edition 2021 verify.rs && ./verify [--api-dir /path/to/modoboa/admin/api] [--logs /var/log/nginx/access.log]. Compiles with Rust std only. Deterministically models DRF's DjangoModelPermissions POST mapping and get_queryset() vs global User.objects resolution across Modoboa 2.11.1 and 2.12.0 (commit 9ff8d736), and audits installed viewsets.py files and reverse-proxy logs.
use std::env;
use std::fs;
use std::path::Path;
use std::process;
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
enum Role {
DomainAdmin { tenant_id: u32 },
Reseller { tenant_id: u32 },
SuperAdmin,
}
#[derive(Clone, Copy)]
struct UserRow {
email: &'static str,
tenant_id: Option<u32>,
is_superuser: bool,
}
fn drf_default_post_perm(role: Role, model: &str) -> bool {
// Mirrors DjangoModelPermissions.perms_map["POST"] -> add_<model>
match (role, model) {
(Role::SuperAdmin, _) => true,
(Role::DomainAdmin { .. }, "user") => true, // holds core.add_user
(Role::Reseller { .. }, "user" | "domain") => true, // holds core.add_user + admin.add_domain
_ => false,
}
}
fn can_reset_password_v2111(caller: Role, target: UserRow, sms_recovery: bool) -> bool {
if !sms_recovery || !drf_default_post_perm(caller, "user") {
return false;
}
// v1/viewsets.py:171 in <=2.11.1 queried global User.objects.filter(email=...) without tenant filter
let _resolved = target.email;
true
}
fn can_reset_password_v2120(caller: Role, target: UserRow, sms_recovery: bool) -> bool {
if !sms_recovery || !drf_default_post_perm(caller, "user") {
return false;
}
// PR #4340 (commit 9ff8d736) scopes lookup via self.get_queryset()
match caller {
Role::SuperAdmin => true,
Role::DomainAdmin { tenant_id } | Role::Reseller { tenant_id } => {
!target.is_superuser && target.tenant_id == Some(tenant_id)
}
}
}
fn can_domain_post_action_v2111(caller: Role, action: &str, target_tenant: u32) -> bool {
match action {
"bulk_delete" | "generate_dkim_key" => matches!(caller, Role::SuperAdmin),
// delete, add_administrator, remove_administrator fell through to DjangoModelPermissions POST -> add_domain
"delete" | "add_administrator" | "remove_administrator" => {
let _ = target_tenant;
drf_default_post_perm(caller, "domain")
}
_ => false,
}
}
fn can_domain_post_action_v2120(caller: Role, action: &str, target_tenant: u32) -> bool {
match (caller, action) {
(Role::SuperAdmin, _) => true,
(Role::Reseller { tenant_id }, "delete" | "bulk_delete" | "generate_dkim_key" | "add_administrator" | "remove_administrator") => {
tenant_id == target_tenant
}
_ => false,
}
}
fn verify_installed_sources(v1_src: &str, v2_src: &str) -> bool {
let scoped_queries = !v1_src.contains("core_models.User.objects.filter(");
let v2_domain_fixed = v2_src.contains("add_administrator")
&& v2_src.contains("remove_administrator")
&& v2_src.contains("CanChangeDomain");
let v2_account_fixed = v2_src.contains("CanDeleteUser");
scoped_queries && v2_domain_fixed && v2_account_fixed
}
fn count_suspect_2xx_logs(raw: &str) -> usize {
let routes = [
"/accounts/reset_password",
"/add_administrator",
"/remove_administrator",
"/domains/",
"/accounts/bulk_delete",
];
raw.lines()
.filter(|l| (l.contains("\" 200 ") || l.contains("\" 204 ")) && (l.contains("POST ") || l.contains("PUT ")))
.filter(|l| routes.iter().any(|r| l.contains(r)) || l.contains("/password/"))
.count()
}
fn main() {
let super_row = UserRow { email: "admin@platform.internal", tenant_id: None, is_superuser: true };
let tenant_a_admin = Role::DomainAdmin { tenant_id: 10 };
let reseller_a = Role::Reseller { tenant_id: 10 };
assert!(can_reset_password_v2111(tenant_a_admin, super_row, true));
assert!(!can_reset_password_v2120(tenant_a_admin, super_row, true));
assert!(can_domain_post_action_v2111(reseller_a, "add_administrator", 99));
assert!(!can_domain_post_action_v2120(reseller_a, "add_administrator", 99));
println!("MODEL_VERIFIED: <=2.11.1 allowed cross-tenant SuperAdmin reset & domain attach; 2.12.0 (9ff8d736) blocked.");
let args: Vec<String> = env::args().collect();
let mut i = 1;
while i < args.len() {
match args[i].as_str() {
"--api-dir" if i + 1 < args.len() => {
let p = Path::new(&args[i + 1]);
let v1 = fs::read_to_string(p.join("v1/viewsets.py")).unwrap_or_default();
let v2 = fs::read_to_string(p.join("v2/viewsets.py")).unwrap_or_default();
let ok = verify_installed_sources(&v1, &v2);
println!("DISK_VIEWSET_CLEAN_2_12_0={}", ok);
if !ok { process::exit(1); }
i += 2;
}
"--logs" if i + 1 < args.len() => {
let raw = fs::read_to_string(&args[i + 1]).unwrap_or_default();
let hits = count_suspect_2xx_logs(&raw);
println!("ACCESS_LOG_2XX_HITS={}", hits);
if hits > 0 { process::exit(1); }
i += 2;
}
_ => { i += 1; }
}
}
}
// Sample output:
// MODEL_VERIFIED: <=2.11.1 allowed cross-tenant SuperAdmin reset & domain attach; 2.12.0 (9ff8d736) blocked.
Unknown beats a false clear. Any Modoboa host below 2.12.0 where a DomainAdmin or Reseller session token is suspect requires a three-step verification pass before closing the incident.
Minute 0 to 5 (Log sweep): inspect reverse-proxy logs for 200 or 204 responses on PUT /api/v[12]/accounts//password/ (< 2.9.0) and POST calls to /api/v[12]/accounts/reset_password/, /api/v2/domains//add_administrator/, /api/v2/domains//remove_administrator/, /api/v2/domains//delete/, and /api/v2/accounts/(delete|bulk_delete)/ (<= 2.11.1), joining client IPs against authtoken_token.
Minute 5 to 10 (Database state): query SELECT _parameters FROM core_localconfig to check whether sms_password_recovery was active. Inspect core_user WHERE is_superuser = true for unexpected password hash updates, and query SELECT domain_id, user_id FROM admin_domain_owners to verify no non-superadmin user attached itself to a foreign domain.
Minute 10 to 15 (Containment and upgrade): upgrade to modoboa >= 2.12.0 (commit 9ff8d736). If mail-freeze rules defer package installation, deny POST to those RPC paths for non-superadmin principals at Nginx and record mitigated, never not_affected, on your decision record alongside clean output from the Rust authorization and source verifier below.
Logs record the attempt. Join tables hold persistence.
Each triplet separates the shortcut a naive rule takes from the mechanism underneath and the call you can defend to an auditor.
Surface signal: Scanner reads modoboa==2.11.1 in requirements.txt and marks CVE-2026-56780 resolved.
Actual mechanism: Commit a1878c49 scoped AccountViewSet.password alone; reset_password and exists queried core_models.User.objects.filter(email=...) globally until 2.12.0 (vciy-2026-0005).
Defensible call: Enforce modoboa >= 2.12.0 (commit 9ff8d7368ff77b0fcff19ff011cb746a30fc9b1b) and sweep POST /accounts/reset_password/ across 2.9.0 through 2.11.1 logs.
Surface signal: Responder assumes a compromised Reseller token holding admin.add_domain can only create new domains.
Actual mechanism: v2.DomainViewSet.get_permissions omitted custom POST actions add_administrator, remove_administrator, and delete, evaluating admin.add_domain instead of CanChangeDomain or CanDeleteDomain.
Defensible call: Audit admin_domain_owners in PostgreSQL for cross-tenant administrator rows before reissuing reseller credentials.
Surface signal: Triage pipeline suppresses CVE-2026-56780 because nvd_cvss is null and EPSS is 0.00455.
Actual mechanism: VulnCheck CNA scored 7.7 (CVSS 4.0) and 7.5 (CVSS 3.1) because any phished tenant admin (PR:L) crosses into platform-wide mail control (C:H/I:H/A:H).
Defensible call: Route CWE-639 multi-tenant authorization flaws on CNA severity (>= 7.0) whenever NVD sits blank.
Routing password through self.get_object() in 2.9.0 left exists and reset_password exposed because both queried core_models.User.objects.filter(...) directly until 2.12.0.
DjangoModelPermissions maps POST to add_<model>. Custom POST routes that mutate administrators or delete rows (add_administrator, delete, bulk_delete) require explicit capability classes.
On Modoboa below 2.12.0, verify both core_user (is_superuser = true) and admin_domain_owners so unauthorized domain bindings do not survive credential rotation.
Recording Modoboa >= 2.12.0 (commit 9ff8d736) beside CNA 7.7 / NVD null proves you closed both the 2.9.0 endpoint and the vciy-2026-0005 viewset seams.
Semver clears a manifest check. Only verifying the whole ViewSet clears the incident.
Jonathan Corners · Founder, Voxell, Inc. · Referenced records: CVE-2026-56780