{"id":"CVE-2025-25298","aliases":["GHSA-2cjv-6wg9-f4f3"],"url":"https://o3.security/vulnerability/CVE-2025-25298","summary":"Missing Maximum Password Length Validation in Strapi Password Hashing","details":"## Summary\n\nStrapi'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.\n\n## POC\nCreate an admin user with a password exceeding 72 characters like 85,\nLog in using only the first 72 characters of the password.\nAuthentication is successful, confirming the issue.\n\nProposed Solution Based on  discussions:\n\nAdd a maximum password length validation (72 characters) during password creation and updates for both Admin and U&P users.\nTruncate passwords exceeding 72 bytes on the server before passing them to bcryptjs during login.\nOptionally, issue a warning to users with passwords longer than 72 bytes during login, informing them of truncation.\n\n## Impact\nThis issue affects all Strapi installations using bcryptjs for password hashing. Until resolved, it can lead to:\nAuthentication Bypass: Users may unknowingly set passwords exceeding 72 bytes, leading to truncated, predictable hashes.\nPerformance Issues: Excessively long passwords can degrade server performance.","published":"2025-10-16T16:21:45.585Z","modified":"2026-10-28T02:30:57.661049926Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@strapi/core","fixedVersion":"5.10.3"}],"fix":{"url":"https://github.com/strapi/strapi/commit/41f8cdf116f7f464dae7d591e52d88f7bfa4b7cb","label":"strapi/strapi@41f8cdf"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25298.json"},{"type":"ADVISORY","url":"https://github.com/strapi/strapi/security/advisories/GHSA-2cjv-6wg9-f4f3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-25298"},{"type":"FIX","url":"https://github.com/strapi/strapi/commit/41f8cdf116f7f464dae7d591e52d88f7bfa4b7cb"},{"type":"PACKAGE","url":"https://github.com/strapi/strapi"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:57.661049926Z"}}