CVE-2021-39904
Medium · 4.3CVSS
4.3
EPSS
0.8%
Published
Nov 5, 2021
CISA due date
—
Cloudanix analysis
A flaw lets someone who started a code review request keep making changes to it even after the project owner tried to lock it down.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Application
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Authorization bypass in the GraphQL API permits a merge request creator to resolve discussions and apply suggestions even after the project owner has locked the merge request.
Why it matters to the business
Locked merge requests can still be altered by their original creators, undermining review controls and potentially allowing unapproved code changes to reach protected branches in projects using the affected software.
How an attack unfolds
An attacker creates a merge request, waits for the project owner to lock it, then issues GraphQL queries that bypass the lock to resolve discussions or apply suggestions directly.
How to fix it
Upgrade to a version containing commit 2a3f5e988be6a2c7dae5ac22b9e86d579b462f4c or later; verify the fix is present in all deployed instances of the software.
How to confirm the fix worked
Confirm the deployed version includes commit 2a3f5e988be6a2c7dae5ac22b9e86d579b462f4c; test that locked merge requests reject resolution and suggestion actions via the GraphQL API.
Typical attack path
- Create a merge request in the target project
- Wait for project owner to apply a lock on the merge request
- Issue crafted GraphQL mutations to resolve discussions or apply suggestions
- Confirm changes persist despite the lock state
How to detect it
Search application and GraphQL access logs for mutations targeting discussion resolution or suggestion application on merge requests that have lock timestamps; correlate with user activity after lock events.
What your security team should do
- Apply the listed commit or newer release immediately to all instances
- Audit recent merge request activity for post-lock modifications
- Review GraphQL access logs for unusual discussion or suggestion operations on locked items
- Enforce merge request locking policies with additional branch protection where feasible
The record
An Improper Access Control vulnerability in the GraphQL API in all versions of GitLab CE/EE starting from 13.1 before 14.2.6, all versions starting from 14.3 before 14.3.4, and all versions starting from 14.4 before 14.4.1 allows a Merge Request creator to resolve discussions and apply suggestions after a project owner has locked the Merge Request
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Bitnami | gitlab | 13.1.0 | 14.2.6 |
| Bitnami | gitlab | 14.4.0 | No fix |
| Ubuntu:16.04:LTS | gitlab | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gitlab | 0 | No fix |
Related vulnerabilities
- CVE-2026-1751 A vulnerability has been discovered in GitLab CE/EE affecting all versions starting with… Also affects gitlab
- CVE-2025-3950 Exposure of Private Personal Information to an Unauthorized Actor in GitLab Also affects gitlab
- CVE-2025-9222 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in… Also affects gitlab
- CVE-2025-10569 Allocation of Resources Without Limits or Throttling in GitLab Also affects gitlab
- CVE-2025-11246 Insufficient Granularity of Access Control in GitLab Also affects gitlab
- CVE-2025-13772 Missing Authorization in GitLab Also affects gitlab
- CVE-2025-13761 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in… Also affects gitlab
- CVE-2025-13781 Missing Authorization in GitLab Also affects gitlab