Skip to content

Critical vulnerability: Missing maximum password length validation with bcryptjs #864

Closed
@sinanptm

Description

@sinanptm

Summary

A critical security vulnerability in impler.io's password hashing implementation allows for potential authentication bypass and performance degradation due to missing maximum password length validation when using bcryptjs.

Details

Strapi currently uses bcryptjs for password hashing, which has a known password length limit of 72 bytes. However, Strapi's implementation only enforces a minimum password length of 8 characters without imposing a maximum length restriction during validation.

The vulnerability arises from two main issues:

bcryptjs silently truncates passwords exceeding 72 bytes, leading to unexpected behavior.
Imler.io lacks validation for maximum password length, allowing users to create passwords longer than the bcryptjs limit.

This combination can result in:
Passwords longer than 72 characters being truncated without user awareness.
Potential authentication issues as users may not realize their full password is not being stored or validated accurately.
Possible predictable hash values for passwords exceeding 72 characters, increasing vulnerability to attacks.

The relevant code for password hashing and validation in Impler.io should be examined, particularly in the user registration and authentication processes.

Impact

Vulnerability Type: Authentication Bypass, Information Disclosure
Severity: High
Affected Component: Password Hashing and Validation in Impler.io's Authentication System

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions