Fix complexity multiplier logic enables Unauthenticated DoS
What does this MR do and why?
Backports 9535c64c ("Fix complexity multiplier logic enables Unauthenticated DoS") from the default branch to 18-11-stable-ee.
The fix covers CVE-2025-14871 and CVE-2026-1168, both denial of service in the GraphQL complexity limiter, CE and EE, severity::2. Resolvers::BaseResolver.complexity_multiplier returned 0 as soon as args[:iid] was present, so a query passing both iid and a large iids array got no multiplier at all and skipped the limiter. The fix checks the iids array first and scales the multiplier with its length (1-100 → 0.05, 101-1000 → 0.5, above 1000 → 5.0), keeping 0 only for a genuine single-iid lookup.
Two files change, app/graphql/resolvers/base_resolver.rb and its spec. The commit cherry-picks cleanly and nothing is regenerated.
18.11 is outside the usual three-version backport window, but self-managed customers on it are still exposed. This was raised with release management in https://gitlab.com/gitlab-com/gl-infra/delivery/-/work_items/22388 and is planned for the 2026-09-23 patch. The fix is already public, released in 19.1.8, 19.2.6 and 19.3.2, so the backport is opened here rather than on the security mirror, which rejects stable branches outside the maintenance policy. Replaces https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/6791.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
- The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
- The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
- Required labels have been applied to this merge request
- [severity label] and [bug subtype] labels (if applicable)
- If this MR fixes a bug that affects customers, the customer label has been applied.
- This MR has been approved by a maintainer (only one approval is required).
- Ensure the
e2e:test-on-omnibus-eejob has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.