Summary
It's possible to access any private fields by filtering it through the lookup parameters
Details
Using the new lookup operator provided by the document service in Strapi 5, it is not properly sanitizing this query operator for private fields.
PoC
- Create a strapi app.
- Create a content-type
- In the content-type you make a new entry
- Go back to the list view
- Add
&lookup[updatedBy][password][$startsWith]=$2 to the end of your url (All passwords start with $2) see that all entries are still there
- Add
&lookup[updatedBy][password][$startsWith]=$3 see the entry disappear proving that the search above works
Impact
You can do filtering attacks on everything related to the object again including admin passwords and reset-tokens. What means that you can get full access to the strapi instance.
Summary
It's possible to access any private fields by filtering it through the lookup parameters
Details
Using the new lookup operator provided by the document service in Strapi 5, it is not properly sanitizing this query operator for private fields.
PoC
&lookup[updatedBy][password][$startsWith]=$2to the end of your url (All passwords start with $2) see that all entries are still there&lookup[updatedBy][password][$startsWith]=$3see the entry disappear proving that the search above worksImpact
You can do filtering attacks on everything related to the object again including admin passwords and reset-tokens. What means that you can get full access to the strapi instance.