🛡️ Sentinel: [HIGH] Fix AuthMe login spoofing vulnerability#23
🛡️ Sentinel: [HIGH] Fix AuthMe login spoofing vulnerability#23
Conversation
🚨 Severity: HIGH 💡 Vulnerability: Players could trick the bot into sending its password to the chat by sending messages like "Please /login". The bot used loose keyword matching and did not verify the message source. 🎯 Impact: Credential exposure (if /login is logged/echoed) and unintended command execution. 🔧 Fix: - Added `position` and `sender` validation to `on_message` in `backend/bot/mineflayer_adapter.py`. - Only process AuthMe prompts if they come from the system (position='system'/'game_info') or have a nil/zero UUID sender. - Replaced loose substring matching with a strict regex that anchors to the start of the message. ✅ Verification: Added `backend/tests/test_authme_security.py` which verifies the logic against various spoofing attempts. Co-authored-by: HCID274 <62495428+HCID274@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR addresses a high-severity security vulnerability in the AuthMe login detection logic. Previously, the bot would respond to any message containing "/login" or "please" without verifying the sender, allowing players to spoof system prompts and potentially trick the bot into revealing its password.
Changes:
backend/bot/mineflayer_adapter.pyto inspect thepositionandsenderarguments of themessageevent.r"^\s*(?:\[.*?\])?\s*(?:please|use|command).*?/login") to prevent players from embedding commands in chat.backend/tests/test_authme_security.pythat mocks the logic and verifies it against various attack vectors and legitimate scenarios..jules/sentinel.md.PR created automatically by Jules for task 9602436624521151803 started by @HCID274