Executive brief
Strapi, a popular open-source content management system, contains a security flaw in how it handles user authentication tokens. When not specifically configured, the system fails to restrict the mathematical methods used to verify these tokens, potentially allowing attackers who have obtained the system's secret key to create unauthorized tokens using non-standard methods. This could lead to unauthorized access or a weakening of the security controls protecting user accounts and data.
Technical details
A cryptographic vulnerability exists in the Strapi users-permissions plugin due to improper algorithm validation in the legacy JWT verification path. When the 'plugin::users-permissions.jwt.algorithm' setting is not explicitly defined, the underlying 'jsonwebtoken' library defaults to accepting any HMAC algorithm (HS256, HS384, or HS512) specified in the token header. An attacker who has obtained the 'jwtSecret' can exploit this 'algorithm confusion' to mint tokens using variants other than the intended HS256, potentially bypassing security monitoring or weakening authentication controls. The issue is resolved in Strapi version 5.7.0 by pinning the default verification algorithm to HS256.
Affected products
- Strapi Strapi < 5.7.0
Timeline
- 2026-06-23: patched: Pull request submitted to fix the default algorithm behavior.
- 2026-06-29: advisory: NVD and VulnCheck published the advisory.