Skip to content

Security Fixes: User Enumeration Mitigation and Removal of Password Hash Exposure#34

Open
Noxurge wants to merge 2 commits intoDifuseHQ:masterfrom
Noxurge:security-fixes
Open

Security Fixes: User Enumeration Mitigation and Removal of Password Hash Exposure#34
Noxurge wants to merge 2 commits intoDifuseHQ:masterfrom
Noxurge:security-fixes

Conversation

@Noxurge
Copy link
Copy Markdown

@Noxurge Noxurge commented Nov 30, 2025

This pull request introduces two security fixes related to authentication behavior and exposure of sensitive data in user-related API responses.

1 - User Enumeration Mitigation

The authentication endpoint returned different error messages depending on whether the username existed or not.
This allowed attackers to determine valid usernames by comparing responses.

Fix implemented

  • Unified authentication error responses.

  • All invalid login attempts now return the same generic message.

2 - Removal of Password Hash Exposure

The user detail API was including password hashes in the returned data, which is unnecessary and unsafe.

Fix implemented

  • Sensitive fields were removed from all user-related API serializers.

  • Ensured password hashes are not returned under any condition.

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