1. Resources
  2. Detection rules
  3. Instance Administrator Access Granted in GitLab

Instance Administrator Access Granted in GitLab detection rules

A user is made an administrator of a GitLab Self-Managed or GitLab Dedicated instance. Administrators have every permission on every group and project, so one unexpected promotion is full control of code, pipelines and secrets.

Platform
GitLab
Severity
Critical
Log source
GitLab audit events
Last updated
Rule formats
Sigmaand queries for: Splunk
What an attacker needs
Control of an existing administrator account, or of an administrator's access token that can call the users API.
Impact
Full control of the instance, which puts every group, project, pipeline, CI/CD variable and runner, the authentication settings and the audit configuration in reach.
Response
Remove administrator access from the promoted account and any other account promoted in the same period, and treat the acting administrator as compromised.
Mitigation
Keep administrators few and on dedicated accounts, enforce two-factor authentication for them, and turn on Admin Mode so that administrator rights need re-authentication.
Audit events
user_admin_status_updateduser_auditor_status_updatedcustom_admin_role_assigned_to_usermember_role_createdmember_role_updatedcustom_admin_role_createdcustom_admin_role_updated

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_mode scope 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.

LevelHighStatusExperimentalLog sourceGitLab audit events
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.

LevelMediumStatusExperimentalLog sourceGitLab audit events
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.

LevelMediumStatusExperimentalLog sourceGitLab audit events
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.

LevelMediumStatusExperimentalLog sourceGitLab audit events
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

Detection hypothesisSequence of events

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.

  1. A user is made an administrator: user_admin_status_updated whose details.to is not false. Keep the user (target_id, target_details), the acting author_id and the time.
  2. Within 4 hours the same target_id appears in user_admin_status_updated with details.to false.
  3. List the events between the two whose author_id is the promoted user, such as personal_access_token_created, user_impersonation, application_setting_updated, member_created or 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:

  1. 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.
  2. Treat the acting administrator as compromised. Reset its password and second factor, revoke its personal access tokens, first those with the admin_mode scope, and remove SSH keys its owner does not recognise.
  3. 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.
  4. Restore the instance settings that were changed in the period, such as sign-in restrictions, two-factor requirements and audit event streams.
  5. 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.
  6. 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_groups or 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.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.