Executive brief
Strapi is a popular headless CMS platform that uses role-based access control to protect sensitive user fields. A flaw in the user registration API allowed unauthenticated attackers to write data to fields marked as private during account signup, bypassing the intended access restrictions. This could enable attackers to modify sensitive user attributes or system configuration fields they should not access.
Technical details
The vulnerability is an authorization bypass in the user registration endpoint of Strapi's users-permissions plugin. The sanitizeInput function, used to filter request payloads during user registration, failed to filter out fields marked as private in the content-type schema. An unauthenticated attacker could send a POST request to the registration API with additional fields in the request body, and any private fields would be written to the database without validation. The attack requires network access to the registration endpoint but no authentication or special privileges. Patches were released in version 4.13.1 for both @strapi/plugin-users-permissions and @strapi/strapi.
Affected products
- Strapi plugin-users-permissions 4.0.0 to 4.13.0
- Strapi Strapi 4.0.0 to 4.13.0
Timeline
- 2023-11-03: disclosed: Security advisory published
- 2023-11-03: patched: Version 4.13.1 released with fix