Skip to content

🛡️ Sentinel: [HIGH] Fix AuthMe login spoofing vulnerability#23

Open
HCID274 wants to merge 1 commit intomainfrom
sentinel/fix-authme-spoofing-9602436624521151803
Open

🛡️ Sentinel: [HIGH] Fix AuthMe login spoofing vulnerability#23
HCID274 wants to merge 1 commit intomainfrom
sentinel/fix-authme-spoofing-9602436624521151803

Conversation

@HCID274
Copy link
Copy Markdown
Owner

@HCID274 HCID274 commented Feb 15, 2026

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:

  • Modified backend/bot/mineflayer_adapter.py to inspect the position and sender arguments of the message event.
  • Implemented strict validation: login prompts are only accepted if the message position is 'system'/'game_info', or if the position is 'chat' but the sender UUID is missing or all zeros (common behavior for some server plugins).
  • Replaced loose keyword matching with a strict regex (r"^\s*(?:\[.*?\])?\s*(?:please|use|command).*?/login") to prevent players from embedding commands in chat.
  • Added a standalone test suite backend/tests/test_authme_security.py that mocks the logic and verifies it against various attack vectors and legitimate scenarios.
  • Documented the vulnerability and fix in .jules/sentinel.md.

PR created automatically by Jules for task 9602436624521151803 started by @HCID274

🚨 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>
@google-labs-jules
Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant