The vulnerability lies in the lack of server-side enforcement of pagination size limits for GraphQL queries, allowing a remote attacker to trigger a denial-of-service by requesting an excessive number of objects. The analysis of the provided patches reveals that the core of the vulnerability was in the GraphQL data processing layer within Liferay Portal's Vulcan module.
The root cause was that GraphQL data fetching processors directly used user-provided pageSize arguments without validating them against a maximum allowed limit. This allowed for resource exhaustion attacks.
The key vulnerable functions identified are:
com.liferay.portal.vulcan.internal.graphql.data.processor.GraphQLDTOContributorDataFetchingProcessor.list: This function directly used the pageSize from the request to create a Pagination object, completely bypassing any size limitation.
com.liferay.portal.vulcan.internal.graphql.data.processor.LiferayMethodDataFetchingProcessor.process: This function, responsible for processing GraphQL method calls, also failed to enforce a cap on the pageSize argument, passing potentially huge values to downstream service methods.
The mitigation strategy involved introducing a centralized PaginationProvider (com.liferay.portal.vulcan.pagination.provider.PaginationProvider). This provider is responsible for retrieving a company-specific page size limit (pageSizeLimit from HeadlessAPICompanyConfiguration) and ensuring that any requested page size does not exceed this limit. The vulnerable functions were then refactored to use this new provider, which sanitizes the pagination parameters before they are used to fetch data. During an exploit, a profiler would show one of these vulnerable functions being called, leading to long execution times and high memory usage in subsequent data access operations.