WikiMind Multi-User Rollout Leaves Critical Data Isolation Gaps: 11 High-Severity Vulnerabilities Found
A comprehensive codebase audit of WikiMind has uncovered severe data isolation failures following the implementation of multi-user support. The investigation, spanning 66 Python files, identified 11 HIGH severity and 9 MEDIUM severity gaps where `user_id` validation is absent—meaning users can access each other's data, modify cross-user settings, or trigger system-wide operations. The vulnerability stems from `user_id` being threaded only through primary write paths during the multi-user feature rollout (PR #206), leaving read paths and secondary operations unprotected.
The audit pinpoints five critical vulnerability categories: file storage read paths are missing ownership checks, nine API endpoints lack user context validation, WebSocket connections suffer from authentication bypass, Q&A conversation ownership validation is broken, and ingest source endpoints have no ownership enforcement. Beyond these isolation failures, the codebase contains significant infrastructure decay. The `LocalFileStorage` abstraction exists but only 2 of 13 file-writing sites use it, `database.py` carries 600 lines of dead migration code, and a custom exception hierarchy remains entirely unused.
The implications extend beyond the documented gaps. A coverage disparity between local testing (80%) and CI pipelines (40%) raises questions about what else remains undetected. Six P0 issues (#338–#343) are now tracked, with fixes required for file storage reads, API endpoints, WebSocket authentication, conversation ownership, and ingest source validation. The findings signal systemic risk in WikiMind's multi-user architecture and mounting pressure to address both the security gaps and underlying code hygiene before the feature expands to production workloads.