Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix dummy hash format for timing attacks#54

Open
luisdlopera wants to merge 1 commit into
mainfrom
sentinel-fix-timing-attack-hash-678763443076962770
Open

πŸ›‘οΈ Sentinel: [CRITICAL] Fix dummy hash format for timing attacks#54
luisdlopera wants to merge 1 commit into
mainfrom
sentinel-fix-timing-attack-hash-678763443076962770

Conversation

@luisdlopera
Copy link
Copy Markdown
Owner

🚨 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 bcryptjs to 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

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.
@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