How the attack works
On GitLab Self-Managed and GitLab Dedicated, users with administrator access have all permissions and can perform any action: read and change every repository, change every CI/CD setting, create tokens for other users, impersonate users and change instance settings such as sign-in restrictions. GitLab.com customers do not hold this level; there the top-level group Owner is the highest role.
An attacker who controls one administrator (a phished password without a second factor, a stolen session or a leaked personal access token) often promotes a second account they control, so access survives the recovery of the first one. GitLab records the change as the audit event type user_admin_status_updated, with the old and new value in the details object. Assigning a custom admin role is recorded as custom_admin_role_assigned_to_user; those roles currently hold read permissions for parts of the Admin area. What a custom role allows is decided when the role is created or edited, which GitLab records as custom_admin_role_created and custom_admin_role_updated, and as member_role_created and member_role_updated for the custom roles of groups and projects. A separate rule on this page reads those four event types. Auditor access is a narrower grant of the same kind: an auditor user has read-only access to all groups and projects of the instance, and GitLab records the change as user_auditor_status_updated, which another rule on this page reads.
What an attacker needs
- Control of an existing administrator account, or of an administrator's access token that can call the users API (with the
admin_modescope when Admin Mode is on). - Log collection: audit event streaming for the instance (Ultimate, GitLab Self-Managed and GitLab Dedicated) to an HTTP destination, received as JSON. User and instance events such as this one are not sent by a top-level group stream, except for enterprise users from GitLab 19.2.
Impact
Full control of the instance: every group, project, pipeline, CI/CD variable and runner, the user directory, authentication settings and the audit configuration itself. Source code and deployment credentials for every team are in reach, which makes this the GitLab equivalent of a new Domain Admin.
Detection rules
GitLab User Granted Instance Administrator Access
Detects a GitLab user being made an instance administrator: audit event type user_admin_status_updated where the new value is not false. The details object has no fixed schema; the change, from and to keys follow GitLab's documented change events and were checked against the GitLab source.
title: GitLab User Granted Instance Administrator Access
id: 151e27a9-9d56-44ac-8838-300d6976652a
status: experimental
description: >-
Detects a GitLab user being made an instance administrator: audit event type
user_admin_status_updated where the new value is not false. The details
object has no fixed schema; the change, from and to keys follow GitLab's
documented change events and were checked against the GitLab source.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/compliance/audit_event_schema/
- https://attack.mitre.org/techniques/T1098/003/
author: Forestall
date: 2026-11-11
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: gitlab
service: audit
detection:
selection:
event_type: user_admin_status_updated
filter_removed:
details.to: 'false'
condition: selection and not filter_removed
falsepositives:
- Planned administrator changes. Confirm each one against a change request; the list of administrators should change rarely.
level: high
False positives
- Planned administrator changes. Confirm each one against a change request; the list of administrators should change rarely.
GitLab User Granted Auditor Access
Detects a GitLab user being made an auditor: audit event type user_auditor_status_updated (GitLab 16.6 and later), which GitLab writes when a user is either made an auditor or removed as an auditor, where the new value is not false. An auditor user has read-only access to all groups and projects of a GitLab Self-Managed or GitLab Dedicated instance without being a member of them, and cannot view the Admin area. For an attacker with administrator access it is a quiet way to give a second account sight of every repository. The details object has no fixed schema. In the GitLab source this event is written by the same change audit as user_admin_status_updated, with the old and the new value, which is why the rule drops events whose details.to is false. Confirm on your version that a removal carries false there.
title: GitLab User Granted Auditor Access
id: 31fd9aba-9689-477c-814b-2dc23139e393
status: experimental
description: >-
Detects a GitLab user being made an auditor: audit event type
user_auditor_status_updated (GitLab 16.6 and later), which GitLab
writes when a user is either made an auditor or removed as an auditor,
where the new value is not false. An auditor user has read-only access
to all groups and projects of a GitLab Self-Managed or GitLab Dedicated
instance without being a member of them, and cannot view the Admin
area. For an attacker with administrator access it is a quiet way to
give a second account sight of every repository. The details object
has no fixed schema. In the GitLab source this event is written by the
same change audit as user_admin_status_updated, with the old and the
new value, which is why the rule drops events whose details.to is
false. Confirm on your version that a removal carries false there.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/compliance/audit_event_schema/
- https://docs.gitlab.com/administration/auditor_users/
- https://attack.mitre.org/techniques/T1098/003/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: gitlab
service: audit
detection:
selection:
event_type: user_auditor_status_updated
filter_removed:
details.to: 'false'
condition: selection and not filter_removed
falsepositives:
- Planned auditor accounts for compliance staff or for a tool that reads every project. Confirm each one against a change request, since the list of auditors should change rarely.
level: medium
False positives
- Planned auditor accounts for compliance staff or for a tool that reads every project. Confirm each one against a change request, since the list of auditors should change rarely.
GitLab Custom Admin Role Assigned to a User
Detects a custom admin role being assigned to a user on a GitLab Self-Managed or GitLab Dedicated instance. Custom admin roles give a regular user selected Admin area permissions without full administrator access.
title: GitLab Custom Admin Role Assigned to a User
id: bff47146-71a4-433c-a900-eaa703133fe4
status: experimental
description: >-
Detects a custom admin role being assigned to a user on a GitLab Self-Managed
or GitLab Dedicated instance. Custom admin roles give a regular user selected
Admin area permissions without full administrator access.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/custom_roles/
- https://attack.mitre.org/techniques/T1098/003/
author: Forestall
date: 2026-11-11
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: gitlab
service: audit
detection:
selection:
event_type: custom_admin_role_assigned_to_user
condition: selection
falsepositives:
- Planned delegation of Admin area access, for example to support or compliance staff.
level: medium
False positives
- Planned delegation of Admin area access, for example to support or compliance staff.
GitLab Custom Role or Custom Admin Role Created or Updated
Detects a custom role or a custom admin role being created or edited (audit event types member_role_created, member_role_updated, custom_admin_role_created and custom_admin_role_updated). A custom role is a default role plus chosen permissions, and GitLab notes that custom permissions can allow actions typically restricted to the Maintainer or Owner role. A custom admin role gives its holders permissions for specific administrator actions. The permissions of an existing role can be edited after the role has been assigned, so an update deserves the same review as a new role. The event type reference does not document where the permissions appear in the event, so the rule matches on the event type and the permissions have to be read in the definition of the role.
title: GitLab Custom Role or Custom Admin Role Created or Updated
id: 079aee9a-2c93-4245-b71c-4807726ee8e2
status: experimental
description: >-
Detects a custom role or a custom admin role being created or edited
(audit event types member_role_created, member_role_updated,
custom_admin_role_created and custom_admin_role_updated). A custom role is
a default role plus chosen permissions, and GitLab notes that custom
permissions can allow actions typically restricted to the Maintainer or
Owner role. A custom admin role gives its holders permissions for specific
administrator actions. The permissions of an existing role can be edited
after the role has been assigned, so an update deserves the same review as
a new role. The event type reference does not document where the
permissions appear in the event, so the rule matches on the event type and
the permissions have to be read in the definition of the role.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/custom_roles/
- https://attack.mitre.org/techniques/T1098/003/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: gitlab
service: audit
detection:
selection:
event_type:
- member_role_created
- member_role_updated
- custom_admin_role_created
- custom_admin_role_updated
condition: selection
falsepositives:
- Administrators and group Owners who design or maintain custom roles. These changes are rare, so compare the permissions of the role with the request that asked for them.
level: medium
False positives
- Administrators and group Owners who design or maintain custom roles. These changes are rare, so compare the permissions of the role with the request that asked for them.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Administrator access granted and removed again within a few hours
An attacker who needs administrator access for one task, such as creating a token for another user, impersonating a user or changing a sign-in setting, can give it to an account they control and take it back afterwards, so that the list of administrators looks unchanged at the next review. A promotion that is reversed for the same user within a few hours, with actions by that user in between, fits this better than a planned change, which lasts.
- A user is made an administrator:
user_admin_status_updatedwhosedetails.tois not false. Keep the user (target_id,target_details), the actingauthor_idand the time. - Within 4 hours the same
target_idappears inuser_admin_status_updatedwithdetails.tofalse. - List the events between the two whose
author_idis the promoted user, such aspersonal_access_token_created,user_impersonation,application_setting_updated,member_createdor changes to audit event streaming destinations. They show what the access was used for.
Eventsuser_admin_status_updatedpersonal_access_token_createduser_impersonationapplication_setting_updatedmember_created
LimitsAn administrator who corrects a mistaken promotion, and access processes that grant administrator access for a fixed time, produce the same pair. GitLab documents the details object as having no fixed schema, so confirm on a test promotion and removal which values details.to carries and that target_id names the user. Actions that write no audit event stay invisible. The 4 hours are a starting point.
Triage
- Identify the acting administrator (
author_name,author_id,ip_address) and the promoted user (target_details,target_id). - Confirm the change with the acting administrator through a separate channel and check it against a change request.
- Review when the promoted account was created, its recent sign-ins and any access tokens or SSH keys it holds.
- If unexplained, remove the administrator flag, revoke the tokens and sessions of both accounts and review their audit events since the change.
Response
Once the attack is confirmed:
- Remove administrator access from the promoted account and from any other account promoted in the same period, then compare the full list of administrators with the approved list.
- Treat the acting administrator as compromised. Reset its password and second factor, revoke its personal access tokens, first those with the
admin_modescope, and remove SSH keys its owner does not recognise. - Look for access the two accounts handed to others. Administrators can create tokens for other users and impersonate users, so revoke tokens that were created for other accounts since the promotion.
- Restore the instance settings that were changed in the period, such as sign-in restrictions, two-factor requirements and audit event streams.
- Rotate the deployment credentials in the CI/CD variables of the projects the accounts opened or changed, and review pipelines and runners altered since the promotion.
- Confirm that only approved administrators remain, and watch for a further promotion or custom admin role assignment.
Mitigation
- Keep the number of administrators small and give each one a dedicated account that is not used for daily development.
- Enforce two-factor authentication for administrators and turn on Admin Mode so that administrator rights need re-authentication.
- Grant administrator access through a reviewed change, and compare the administrator list (
GET /users?admins=true) with the approved list on a schedule. - Where administrator access comes from SAML
admin_groupsor LDAP group sync, protect and monitor those identity provider groups as Tier 0. - Stream instance audit events to your SIEM and alert on every administrator promotion.
Frequently asked questions
Why does my top-level group stream not show administrator promotions?
`user_admin_status_updated` is a user and instance event. Such events are not sent by a top-level group stream, except for enterprise users from GitLab 19.2. The rule needs audit event streaming for the instance, which is available with Ultimate on GitLab Self-Managed and GitLab Dedicated.
Does this alert apply to GitLab.com?
No. GitLab.com customers do not hold instance administrator access. There the top-level group Owner is the highest customer role, so watch for new Owners of the top-level group instead.
Is a custom admin role assignment as serious as a full promotion?
Not at present. Custom admin roles give a regular user selected Admin area permissions without full administrator access, and those roles currently hold read permissions for parts of the Admin area. The rule for them is therefore at medium level. Review each assignment anyway and check which permissions the role holds on your version.
Why does the rule exclude events where the new value is false?
The same event type reports both directions. The rule matches `user_admin_status_updated` and drops events whose `details.to` is `false`, which are removals of administrator access. The `details` object has no fixed schema, so confirm on your version that a promotion carries another value there.