π‘οΈ Sentinel: [CRITICAL] Fix bcrypt timing attack and DoS vulnerabilities#49
π‘οΈ Sentinel: [CRITICAL] Fix bcrypt timing attack and DoS vulnerabilities#49luisdlopera wants to merge 2 commits into
Conversation
- Replaced invalid dummy bcrypt hash with a valid one to prevent timing attacks (user enumeration). - Added @maxlength(100) to password fields in Auth DTOs to prevent CPU exhaustion DoS attacks during hashing.
|
π 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. |
- Replaced invalid dummy bcrypt hash with a valid one to prevent timing attacks (user enumeration). - Added @maxlength(100) to password fields in Auth DTOs to prevent CPU exhaustion DoS attacks during hashing. - Wrapped Next.js useSearchParams in a Suspense boundary in auth page to fix build failure.
π¨ Severity: CRITICAL
π‘ Vulnerability:
bcrypt.compareto return almost instantly and enabling user enumeration.π― Impact: Attackers could enumerate valid email addresses and crash/overload the server by submitting massive passwords.
π§ Fix:
@MaxLength(100)validation to all relevant password fields in DTOs.β Verification: Ran the test suite successfully and verified that a dummy comparison takes the same amount of time as a normal one. Length constraints are validated via class-validator.
PR created automatically by Jules for task 5413427270839107431 started by @luisdlopera