π‘οΈ Sentinel: [CRITICAL] Fix dummy hash format for timing attacks#54
π‘οΈ Sentinel: [CRITICAL] Fix dummy hash format for timing attacks#54luisdlopera wants to merge 1 commit into
Conversation
When a user is not found, the backend attempted to prevent timing attacks by comparing against a dummy bcrypt hash. However, the dummy hash used was structurally invalid. Because of this, `bcryptjs` would fail-fast instead of performing the CPU-intensive comparison, making the timing mitigation completely ineffective and allowing user enumeration. Replaced the invalid string with a structurally valid pre-computed bcrypt hash.
|
π 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. |
π¨ Severity: CRITICAL
π‘ Vulnerability: Timing attack leading to user enumeration. The backend attempted to mitigate timing attacks by comparing against a dummy hash when a user is not found. However, the dummy hash was structurally invalid, causing
bcryptjsto fail-fast. This meant that the dummy comparison executed much faster than a real comparison.π― Impact: Attackers could enumerate registered emails/users by observing response times.
π§ Fix: Replaced the invalid dummy string with a valid, pre-computed bcrypt hash.
β Verification: Ran backend tests and linters. Checked git status to make sure only the intended files are committed. Included a new Sentinel Journal entry.
PR created automatically by Jules for task 678763443076962770 started by @luisdlopera