How the attack works
The Owner role is the highest role in a GitLab group. Owners manage members and roles, group access tokens, group CI/CD variables and runners, SAML single sign-on, audit event streams, visibility and deletion, and the role is inherited by every subgroup and project under the group. On GitLab.com, where customers have no instance administrators, a top-level group Owner controls the whole namespace.
After taking over one Owner, or a group access token with the Owner role, attackers add or promote an account they control so that access survives a password reset. GitLab records direct changes as member_created and member_updated, with the role label in the details object. Membership can also arrive indirectly: a SAML or LDAP group link maps an identity provider group to a GitLab role, including Owner, and members are added at their next sign-in or sync.
What an attacker needs
- Control of an account or token that can manage group members: an existing Owner, an instance administrator, or a custom role with the manage group members permission (limited to roles at or below its base role).
- Log collection: audit event streaming (Ultimate) for the top-level group or the instance, to an HTTP destination, received as JSON. Group streams include events from subgroups and projects.
Impact
Control of every project in the group hierarchy: source code, protected branch rules, CI/CD variables that hold deployment credentials, runners, group access tokens and the audit stream configuration. From there an attacker can change pipelines to reach the cloud accounts the group deploys to.
Detection rules
GitLab Group Member Added or Promoted to Owner
Detects a member being added to a GitLab group with the Owner role, or an existing member being changed to Owner (audit event types member_created and member_updated on a Group entity). The role label is read from details.as, which GitLab writes as "Default role: Owner"; the details object has no fixed schema, so validate the label on your version.
title: GitLab Group Member Added or Promoted to Owner
id: a76b587a-27c4-4940-9f58-bc2b569ebec4
status: experimental
description: >-
Detects a member being added to a GitLab group with the Owner role, or an
existing member being changed to Owner (audit event types member_created and
member_updated on a Group entity). The role label is read from details.as,
which GitLab writes as "Default role: Owner"; the details object has no
fixed schema, so validate the label on your version.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/compliance/audit_event_schema/
- https://docs.gitlab.com/user/permissions/
- 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:
event_type:
- member_created
- member_updated
entity_type: Group
selection_owner:
details.as|endswith: Owner
condition: all of selection_*
falsepositives:
- Planned Owner changes and new group access tokens created with the Owner role (their bot user becomes a member).
- A change to the expiry date of an existing Owner, which GitLab also reports as member_updated with the current role in details.as, and a custom role whose name ends in Owner.
- To limit the rule to top-level groups, add a filter that excludes entity_path values containing a slash.
level: high
False positives
- Planned Owner changes and new group access tokens created with the Owner role (their bot user becomes a member).
- A change to the expiry date of an existing Owner, which GitLab also reports as member_updated with the current role in details.as, and a custom role whose name ends in Owner.
- To limit the rule to top-level groups, add a filter that excludes entity_path values containing a slash.
GitLab SAML or LDAP Group Link Created
Detects a new SAML or LDAP group link on a GitLab group. A group link maps an identity provider group to a GitLab role, up to Owner, and its members receive that role at their next sign-in or sync. For SAML links the access level is written in details.custom_message. The LDAP event type ldap_group_link_created exists from GitLab 19.4; older versions report only SAML links.
title: GitLab SAML or LDAP Group Link Created
id: 7e1f3ce8-0d2b-4a84-9529-874adb8bfda3
status: experimental
description: >-
Detects a new SAML or LDAP group link on a GitLab group. A group link maps
an identity provider group to a GitLab role, up to Owner, and its members
receive that role at their next sign-in or sync. For SAML links the access
level is written in details.custom_message. The LDAP event type
ldap_group_link_created exists from GitLab 19.4; older versions report only
SAML links.
references:
- https://docs.gitlab.com/user/compliance/audit_event_types/
- https://docs.gitlab.com/user/group/saml_sso/group_sync/
- 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:
- saml_group_links_created
- ldap_group_link_created
condition: selection
falsepositives:
- Planned onboarding of teams through identity provider groups. Review the mapped role and the group's members.
level: medium
False positives
- Planned onboarding of teams through identity provider groups. Review the mapped role and the group's members.
Triage
- Read
entity_pathto see the group. A path without a slash is a top-level group. - Identify the actor (
author_name,ip_address) and the member (target_details), and checkdetails.asand, for updates,details.fromanddetails.to. - Check whether the new Owner is a human, a service account or a group access token bot (
group_{id}_bot_{random}). - If unexplained, lower or remove the membership, revoke the account's tokens and review its audit events, including new access tokens, deploy keys and CI/CD variable changes.
- For a new SAML or LDAP group link, read the access level in
details.custom_messageand review who is in the identity provider group.
Response
Once the attack is confirmed:
- Remove the unauthorized Owner or return it to its previous role. If the role came through a SAML or LDAP group link, delete the link as well, or the membership comes back at the next sign-in or sync.
- Take the Owner role from the account that granted it until its owner confirms the change, and reset its password and second factor. If a group access token with the Owner role made the change, revoke that token.
- Remove what the new Owner created or changed in the group, such as further members, group access tokens, deploy keys, runners, SAML single sign-on settings and audit event streams.
- Rotate the deployment credentials stored in the group's CI/CD variables, because an Owner manages those variables and they reach the cloud accounts the group deploys to.
- Compare the Owners of the top-level group and of its subgroups with the approved list, and watch for the same account or address adding members again.
Mitigation
- Keep at least two but few Owners on each top-level group, on dedicated accounts with two-factor authentication.
- Give day-to-day administration to the Maintainer role or to custom roles instead of Owner.
- Review SAML and LDAP group links that map to Owner or Maintainer, and protect the identity provider groups behind them.
- On GitLab Self-Managed and GitLab Dedicated, consider the global SAML group memberships lock so that only administrators change memberships in synced groups.
- Stream audit events to your SIEM and alert on every new Owner.
Frequently asked questions
Why does a new group access token show up as a new Owner?
A group access token belongs to a bot user that becomes a member of the group. When the token is created with the Owner role, GitLab reports that bot user as a new member with the Owner role, named like `group_{id}_bot_{random}`. Treat it as an Owner that needs no password and confirm who created the token.
Can an account become Owner without anyone adding it by hand?
Yes. A SAML or LDAP group link maps an identity provider group to a GitLab role, up to Owner, and its members receive that role at their next sign-in or sync. The second rule reports a new link, but who belongs to the identity provider group is decided outside GitLab. The LDAP event type `ldap_group_link_created` exists only from GitLab 19.4.
Why did the rule fire when nobody's role changed?
GitLab also reports a change to the expiry date of an existing Owner as `member_updated`, with the current role in `details.as`. The rule reads the role label from that field, so such an update matches. A custom role whose name ends in Owner matches too, so confirm in the group's member list whether a role really changed.
How do I keep only the alerts for top-level groups?
Read `entity_path`. A path without a slash is a top-level group. To limit the rule, add a filter that excludes `entity_path` values containing a slash, and keep in mind that the Owner role on a subgroup is still inherited by every subgroup and project below it.