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.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2025-25298? CVE-2025-25298 is a medium-severity security vulnerability in @strapi/core (npm), affecting versions < 5.10.3. It is fixed in 5.10.3.
- Which versions of @strapi/core are affected by CVE-2025-25298? @strapi/core (npm) versions < 5.10.3 is affected.
- Is there a fix for CVE-2025-25298? Yes. CVE-2025-25298 is fixed in 5.10.3. Upgrade to this version or later.
- Is CVE-2025-25298 exploitable, and should I be worried? Whether CVE-2025-25298 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-25298 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-25298? Upgrade
@strapi/coreto 5.10.3 or later.