Описание
Unauthorized Access to Private Fields in User Registration API
System Details
| Name | Value |
|---|---|
| OS | Windows 11 |
| Version | 4.11.1 (node v16.14.2) |
| Database | mysql |
Description
I marked some fields as private fields in user content-type, and tried to register as a new user via api, at the same time I added content to fill the private fields and sent a post request, and as you can see from the images below, I can write to the private fields.




To prevent this, I went to the extension area and tried to extend the register method, for this I wanted to do it using the sanitizeInput function that I know in the source codes of the strap. But the sanitizeInput function did not filter out private fields.
here's the solution I've temporarily kept to myself, code snippet
Пакеты
@strapi/plugin-users-permissions
>= 4.0.0, < 4.13.1
4.13.1
@strapi/strapi
>= 4.0.0, < 4.13.1
4.13.1
Связанные уязвимости
strapi is an open-source headless CMS. Versions prior to 4.13.1 did not properly restrict write access to fielded marked as private in the user registration endpoint. As such malicious users may be able to errantly modify their user records. This issue has been addressed in version 4.13.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.