#79 finding 5 (HIGH): unthrottled DM invite auto-join + unrotated audit.jsonl; trust is_direct #85

Closed
opened 2026-07-11 09:08:06 +00:00 by robocub · 1 comment
Collaborator

From the #79 review. Not fixed.

  • handle_invite accepts every non-banned DIRECT invite under open_registration and appservice-joins with NO rate limit or cap → a Sybil swarm of DM invites grows the bot's joined-room set without bound (memory + sync latency on the single process).
  • audit.jsonl is opened append-only with NO rotation/size cap → invite/link/report spam fills the data-dir disk.
  • handle_invite trusts the inviter-set is_direct flag as proof of a DM without checking joined_members_count, so a self-serve user can pull the bot into a multi-user room and trigger a greeting there (a second, un-rate-limited seeding path). (The command path itself is still gated by is_command_room, so this is greeting-leak + join, not command execution.)

Fix

Cap + rate-limit invite acceptance per sender and globally; leave idle/empty DM rooms after a TTL; rotate/size-bound audit.jsonl and rate-limit audit writes per actor; verify joined_members_count <= 2 before treating an accepted invite as a real DM (post-join).

Severity HIGH (DoS/disk).

From the #79 review. **Not fixed.** - `handle_invite` accepts every non-banned DIRECT invite under open_registration and appservice-joins with NO rate limit or cap → a Sybil swarm of DM invites grows the bot's joined-room set without bound (memory + sync latency on the single process). - `audit.jsonl` is opened append-only with NO rotation/size cap → invite/link/report spam fills the data-dir disk. - `handle_invite` trusts the inviter-set `is_direct` flag as proof of a DM without checking `joined_members_count`, so a self-serve user can pull the bot into a multi-user room and trigger a greeting there (a second, un-rate-limited seeding path). (The command path itself is still gated by `is_command_room`, so this is greeting-leak + join, not command execution.) ## Fix Cap + rate-limit invite acceptance per sender and globally; leave idle/empty DM rooms after a TTL; rotate/size-bound `audit.jsonl` and rate-limit audit writes per actor; verify `joined_members_count <= 2` before treating an accepted invite as a real DM (post-join). Severity HIGH (DoS/disk).
Author
Collaborator

Core fixed + shipped in v0.3.0-alpha.18 (deployed 2026-07-11). audit.jsonl rotates to .1 at 64 MiB; an accepted DM invite found to have >2 members (spoofed is_direct) is left instead of greeted. Residual (per-sender invite cooldown + idle DM-room TTL leave) tracked in #89.

Core fixed + shipped in **v0.3.0-alpha.18** (deployed 2026-07-11). `audit.jsonl` rotates to `.1` at 64 MiB; an accepted DM invite found to have >2 members (spoofed `is_direct`) is left instead of greeted. Residual (per-sender invite cooldown + idle DM-room TTL leave) tracked in #89.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
dark/nether-voicebridge#85
No description provided.