Skip to main content

Strapi CVE-2025-25298

MEDIUM
Weak Encoding for Password (CWE-261)
2025-10-16 security-advisories@github.com
6.3
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify account with >72-byte password
  2. Exploit
    Supply only the first 72 bytes at login
  3. Execution
    bcryptjs matches truncated hash
  4. Impact
    Gain unauthorized account access

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Strong password encoding
Exploitation Conditions

Exploitation requires a specific non-default precondition: a target admin or users-permissions account must have been created or updated with a password longer than 72 bytes, so that bcryptjs truncation discards the trailing bytes. The attacker must then obtain or correctly guess the first 72 bytes of that password. Limiting factors that reduce realistic risk: passwords exceeding 72 bytes are uncommon in practice, the entropy reduction only matters when the truncated prefix is itself weak or known, and the attacker gains no advantage unless they already possess most of the credential - reflected in the AC:H (high complexity) metric. A secondary condition is that overlong inputs can impose unnecessary bcrypt processing overhead regardless of authentication outcome.

Impact

This is a genuine but low-severity design weakness rather than a high-priority threat. The CVSS 4.0 base score of 6.3 (Medium) is driven by AV:N (network) but tempered by AC:H (high attack complexity) and limited to VC:L (low confidentiality impact), with no integrity (VI:N) or availability (VA:N) impact. The flaw is that @strapi/core <5.10.3 relies on bcryptjs, which silently truncates passwords beyond 72 bytes, so entropy from longer passwords is lost. Although the CVSS vector shows PR:N (unauthenticated), real exploitation is heavily gated: a victim must first have chosen a password exceeding 72 bytes, and an attacker must independently obtain or guess the first 72 bytes - the AC:H metric correctly reflects these compounding preconditions. Publicly available exploit code exists (a GHSA proof-of-concept demonstrating the truncation), but this is a demonstration of the truncation behavior, not a weaponized authentication-bypass tool, and POC availability must not be conflated with active exploitation. There is no CISA KEV listing and no EPSS score was provided in the input, so there is no signal of real-world exploitation or high predicted exploitation probability. No SSVC data was supplied. On balance the signals are consistent and point the same direction: a legitimate hardening issue with marginal practical risk, not an urgent emergency.

Exploit ScenarioDerived

A Strapi administrator or user, believing longer passwords are stronger, sets a password exceeding 72 bytes; bcryptjs silently truncates it to the first 72 bytes during hashing. An attacker who knows or can guess only the first 72 bytes can then authenticate successfully, as demonstrated by the publicly available GHSA proof-of-concept (create an 85-character password, log in with the first 72). The practical likelihood is low because it depends on users choosing unusually long passwords and the attacker already possessing most of the credential.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 19, 2026

Password truncation in Strapi's bcryptjs hashing (@strapi/core before 5.10.3) means an account created with a password longer than 72 bytes can later authenticate using only the first 72 bytes, because bcryptjs silently ignores everything past that boundary. Affected deployments are essentially all Strapi installations of the 5.x line prior to 5.10.3 that use local admin or users-permissions credentials, and the practical risk is low: the attacker gains nothing unless a target already chose an over-long password and its 72-byte prefix can be obtained or guessed, which is why the assessed vector carries high attack complexity (AC:H) with only confidentiality impact. A public proof of concept and the upstream fix commit are available; there is no indication of active exploitation (not in CISA KEV), and the weakness is best characterized as a genuine but low-severity design flaw rather than a high-priority threat.

RemediationAI

Upgrade to @strapi/core 5.10.3 or later (Strapi 5.10.3), which introduces server-side byte-length validation enforcing a 72-byte maximum on password creation, registration, reset, and user update, per advisory GHSA-2cjv-6wg9-f4f3 and fix commit 41f8cdf116f7f464dae7d591e52d88f7bfa4b7cb; vendor-released patch: 5.10.3. The vendor states no workarounds exist, and the UI-only character cap in older releases is insufficient because it does not measure bytes and is not enforced server-side, so upgrading is the only complete fix. Because the patch validates new and changed passwords but cannot retroactively change how existing credentials were hashed, follow the upgrade by identifying admin and users-permissions accounts whose stored password could exceed 72 bytes and forcing a credential rotation or reset for them via the admin panel or a password-reset flow; the trade-off is user disruption and support load, but it eliminates any latent truncated-hash accounts. Longer term, reducing reliance on local bcrypt credentials by fronting Strapi with an SSO/identity provider and disabling open self-registration on the users-permissions plugin shrinks the exposure surface, at the cost of added integration complexity and losing Strapi's built-in login UX. As a lower-confidence compensating control for organizations that cannot patch immediately, network-restrict the /admin and /api/auth/local/register endpoints and enforce a strong upstream password policy that excludes passphrases beyond 72 bytes, though this is policy-dependent and does not remove the underlying truncation behavior. Monitor authentication logs for successful logins using prefixes of previously set over-long passwords, and treat any account with an unusually long stored password policy exception as requiring review.

Affected Packages

npm @strapi/core fix: 5.10.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Strapi stores local admin and end-user credentials using bcryptjs, an implementation of the bcrypt adaptive hashing algorithm. bcrypt operates on at most 72 bytes of input and silently discards any trailing bytes, a long-standing property of the design that becomes a security problem when the application does not validate password length. Classified as CWE-261 (Weak Encoding for Password), the flaw is that Strapi's validation layer never enforced a byte ceiling: the admin-panel Yup schemas used a character-based .max(70) check on registration and admin creation, while the server-side common-validators only applied an 8-70 byte rule on the password-reset path, leaving registration and user update paths without a byte-aware constraint. Because the limit is measured in bytes rather than characters, multibyte UTF-8 input (for example a three-byte CJK character) shifts the effective cutoff, which is exactly what the upstream patch addresses: it replaces the character-count checks with a Yup .test('max-bytes') rule that measures new TextEncoder().encode(value).length and rejects anything above 72 bytes, with new unit tests covering exactly-72-byte ASCII and mixed multibyte passwords, 73-byte rejections, and truncated UTF-8 surrogate input. Secondary to the authentication concern, unbounded password length also allows oversized inputs to consume unnecessary bcrypt processing time on login and registration endpoints.

Know when Strapi gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 6.3 MEDIUM
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
vuln.today AI 3.7 LOW

Network-reachable login (AV:N) with no auth (PR:N), but AC:H because the victim must have set a >72-byte password and the attacker must know its 72-byte prefix; only minor confidentiality impact (C:L).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 npm packages depend on @strapi/core (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 5.10.3.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Medium
popular open-source headless CMS, common but not universally deployed
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

52
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

cpe:2.3:a:strapi:strapi:*:*:*:*:*:*:*:*

More in Strapi

View all
CVE-2023-22894 MEDIUM POC
4.9 Apr 19

Strapi through 4.5.5 allows attackers (with access to the admin panel) to discover sensitive user details by exploiting

CVE-2023-38507 CRITICAL POC
9.8 Sep 15

Strapi is the an open-source headless content management system. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2022-27263 CRITICAL POC
9.8 Apr 12

An arbitrary file upload vulnerability in the file upload module of Strapi v4.1.5 allows attackers to execute arbitrary

CVE-2019-18818 CRITICAL POC
9.8 Nov 07

strapi before 3.0.0-beta.17.5 mishandles password resets within packages/strapi-admin/controllers/Auth.js and packages/s

CVE-2022-32114 HIGH POC
8.8 Jul 13

An unrestricted file upload vulnerability in the Add New Assets function of Strapi 4.1.12 allows attackers to conduct XS

CVE-2022-31367 HIGH POC
8.8 Sep 27

Strapi before 3.6.10 and 4.x before 4.1.10 mishandles hidden attributes within admin API responses. Rated high severity

CVE-2024-37818 HIGH POC
8.6 Jun 20

Strapi v4.24.4 was discovered to contain a Server-Side Request Forgery (SSRF) via the component /strapi.io/_next/image.

CVE-2024-34065 HIGH POC
8.1 Jun 12

Strapi is an open-source content management system. Rated high severity (CVSS 8.1), this vulnerability is remotely explo

CVE-2021-28128 HIGH POC
8.1 May 06

In Strapi through 3.6.0, the admin panel allows the changing of one's own password without entering the current password

CVE-2023-39345 HIGH POC
7.5 Nov 06

strapi is an open-source headless CMS. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no au

CVE-2023-34235 HIGH POC
7.5 Jul 25

Strapi is an open-source headless content management system. Rated high severity (CVSS 7.5), this vulnerability is remot

CVE-2023-22893 HIGH POC
7.5 Apr 19

Strapi through 4.5.5 does not verify the access or ID tokens issued during the OAuth flow when the AWS Cognito login pro

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy