GHSA-2cjv-6wg9-f4f3

Suggest an improvement
Source
https://github.com/advisories/GHSA-2cjv-6wg9-f4f3
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/10/GHSA-2cjv-6wg9-f4f3/GHSA-2cjv-6wg9-f4f3.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2cjv-6wg9-f4f3
Aliases
Published
2025-10-16T18:41:43Z
Modified
2025-11-27T09:11:22Z
Severity
  • 6.3 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
Strapi Password Hashing is Missing Maximum Password Length Validation
Details

Summary

Strapi's password hashing implementation using bcryptjs lacks maximum password length validation. Since bcryptjs truncates passwords exceeding 72 bytes, this creates potential vulnerabilities such as authentication bypass and performance degradation.

POC

Create an admin user with a password exceeding 72 characters like 85, Log in using only the first 72 characters of the password. Authentication is successful, confirming the issue.

Proposed Solution Based on discussions:

Add a maximum password length validation (72 characters) during password creation and updates for both Admin and U&P users. Truncate passwords exceeding 72 bytes on the server before passing them to bcryptjs during login. Optionally, issue a warning to users with passwords longer than 72 bytes during login, informing them of truncation.

Impact

This issue affects all Strapi installations using bcryptjs for password hashing. Until resolved, it can lead to: Authentication Bypass: Users may unknowingly set passwords exceeding 72 bytes, leading to truncated, predictable hashes. Performance Issues: Excessively long passwords can degrade server performance.

Database specific
{
    "cwe_ids":  [
        "CWE-261"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2025-10-16T18:41:43Z",
    "nvd_published_at":  "2025-10-16T17:15:33Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / @strapi/core

Package

Name
@strapi/core
View open source insights on deps.dev
Purl
pkg:npm/%40strapi/core

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
5.10.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/10/GHSA-2cjv-6wg9-f4f3/GHSA-2cjv-6wg9-f4f3.json"