CVE-2024-56143: Strapi Allows Unauthorized Access to Private Fields via parms.lookup
Summary It's possible to access any private fields by filtering 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
1. Create a strapi app. 2. Create a content-type 3. In the content-type you make a new entry 4. Go back to the list view 4. Add &lookup[updatedBy][password][$startsWith]=$2 to the end of your url (All passwords start with $2) see that all entries are still there 6. Add &lookup[updatedBy][password][$startsWith]=$3 see the entry disappear proving that the search above works
Impact
An attacker can perform filtering attacks on everything related to the object, including admin passwords and reset-tokens. This means that they can gain full access to the strapi instance.
Other sources
Strapi is an open-source headless content management system. In versions from 5.0.0 to before 5.5.2, the lookup operator provided by the document service does not properly sanitize query parameters for private fields. An attacker can access private fields, including admin passwords and reset tokens, by crafting queries with the lookup parameter. This vulnerability is fixed in 5.5.2.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56143?
CVE-2024-56143 is considered a high severity vulnerability due to its potential to expose sensitive private fields.
How do I fix CVE-2024-56143?
To resolve CVE-2024-56143, update Strapi to version 5.5.2 or later to ensure proper sanitization of query parameters.
What versions of Strapi are affected by CVE-2024-56143?
CVE-2024-56143 affects Strapi versions from 5.0.0 to before 5.5.2.
What kind of data can be accessed due to CVE-2024-56143?
Due to CVE-2024-56143, attackers can potentially access private fields, including sensitive information like admin passwords.
Is there a workaround for CVE-2024-56143 if I cannot update Strapi immediately?
There are no recommended workarounds for CVE-2024-56143, so updating to a secure version is essential.