{"id":"CVE-2025-25298","aliases":["CVE-2025-25298","GHSA-2cjv-6wg9-f4f3"],"related":[],"kind":"vulnerability","state":"published","title":"Missing Maximum Password Length Validation in Strapi Password Hashing","summary":"Strapi is an open source headless CMS. The @strapi/core package before version 5.10.3 does not enforce a maximum password length when using bcryptjs for password hashing. Bcryptjs ignores any bytes beyond 72, so passwords longer than 72 bytes are silently truncated. A user can create an account with a password exceeding 72 bytes and later authenticate with only the first 72 bytes. This reduces the effective entropy of overlong passwords and may mislead users who believe characters beyond 72 bytes are required, creating a low likelihood of unintended authentication if an attacker can obtain or guess the truncated portion. Long over‑length inputs can also impose unnecessary processing overhead. The issue is fixed in version 5.10.3. No known workarounds exist.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Strapi is an open source headless CMS. The @strapi/core package before version 5.10.3 does not enforce a maximum password length when using bcryptjs for password hashing. Bcryptjs ignores any bytes beyond 72, so passwords longer than 72 bytes are silently truncated. A user can create an account with a password exceeding 72 bytes and later authenticate with only the first 72 bytes. This reduces the effective entropy of overlong passwords and may mislead users who believe characters beyond 72 bytes are required, creating a low likelihood of unintended authentication if an attacker can obtain or guess the truncated portion. Long over‑length inputs can also impose unnecessary processing overhead. The issue is fixed in version 5.10.3. No known workarounds exist.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Strapi es un CMS headless de código abierto. El paquete @strapi/core antes de la versión 5.10.3 no impone una longitud máxima de contraseña al usar bcryptjs para el hash de contraseñas. Bcryptjs ignora cualquier byte más allá de 72, por lo que las contraseñas de más de 72 bytes se truncan silenciosamente. Un usuario puede crear una cuenta con una contraseña que exceda los 72 bytes y luego autenticarse con solo los primeros 72 bytes. Esto reduce la entropía efectiva de las contraseñas excesivamente largas y puede engañar a los usuarios que creen que se requieren caracteres más allá de los 72 bytes, creando una baja probabilidad de autenticación no intencionada si un atacante puede obtener o adivinar la porción truncada. Las entradas largas de longitud excesiva también pueden imponer una sobrecarga de procesamiento innecesaria. El problema está solucionado en la versión 5.10.3. No existen soluciones alternativas conocidas.","source":"nvd"}],"published":"2025-10-16T16:21:45.585Z","modified":"2026-10-19T17:10:00.173Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-261"],"affected":[{"ranges":[{"version":"< 5.10.3","status":"affected"}],"vendor":"strapi","product":"strapi","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.10.3"}],"ecosystem":"npm","package":"@strapi/core","purl":"pkg:npm/%40strapi/core","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.10.3"}],"vendor":"strapi","product":"strapi","cpe":"cpe:2.3:a:strapi:strapi:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/strapi/strapi/security/advisories/GHSA-2cjv-6wg9-f4f3","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/strapi/strapi/commit/41f8cdf116f7f464dae7d591e52d88f7bfa4b7cb","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-25298","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/strapi/strapi","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-10-16T18:08:48.659Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-25298","url":"https://www.cve.org/CVERecord?id=CVE-2025-25298","licence":"CVE Terms of Use","modified":"2025-10-16T18:12:49.837Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2cjv-6wg9-f4f3","url":"https://github.com/advisories/GHSA-2cjv-6wg9-f4f3","licence":"CC-BY-4.0","modified":"2025-11-27T09:11:22.621Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-25298","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-25298","licence":"Public domain","modified":"2026-10-19T17:10:00.173Z"}],"updatedAt":"2026-11-25T22:59:06.499Z","epss":{"score":0.004,"percentile":0.36343,"date":"2026-12-01T12:00:22.000Z"}}