1. Resources
  2. Detection rules
  3. IP Restriction or Allowed Email Domain Changed for a GitLab Group

IP Restriction or Allowed Email Domain Changed for a GitLab Group detection rules

An Owner changes the IP address allowlist or the allowed email domains of a top-level GitLab group, or an authentication restriction for its users. Access from outside the organization's network or by outside accounts can follow.

Platform
GitLab
Severity
Medium
Log source
GitLab audit events
Last updated
Rule formats
Sigmaand queries for: Splunk
What an attacker needs
The Owner role on the top-level group, which GitLab lets reach the group settings from any address.
Impact
Sessions, tokens and deploy keys work from outside the organization's network, or outside accounts and long-lived credentials become possible again.
Response
Restore the approved address ranges, domains and restrictions, and treat the Owner account that made the change as compromised.
Mitigation
Keep the Owner role on the top-level group small, and compare its access settings with an approved record on a schedule.
Audit events
allowed_email_domain_updateddisable_personal_access_tokens_updateddisable_ssh_keys_updatedstep_up_auth_required_oauth_provider_updatedip_restrictions_changed

How the attack works

A top-level group in GitLab can limit who reaches it beyond roles. Restrict access by IP address (Premium and Ultimate) accepts a list of address ranges and applies to the GitLab UI of the group, its subgroups and projects, to the API and to Git over SSH and HTTP. GitLab states that it also applies to project and group access tokens, service accounts, deploy keys and deploy tokens. Restrict membership by email domain is an allowlist of domains: a user's primary email domain must match an entry to access the group and its projects. For enterprise users a group can disable personal access tokens and SSH keys, and a group can force step-up authentication with a provider that was added for the instance.

These settings are the group's conditional access, and the Owner role can change every one of them. GitLab notes that administrators and group Owners can always access group settings, so an Owner account does not have to come from an allowed address to edit the allowlist. An attacker who holds such an account adds an address range or a domain, or switches a restriction off, and stolen tokens, outside accounts or Git clients then work from places they could not reach before. GitLab records the changes as ip_restrictions_changed (any change in the IP allowlist), allowed_email_domain_updated, disable_personal_access_tokens_updated, disable_ssh_keys_updated and step_up_auth_required_oauth_provider_updated.

What an attacker needs

  • The Owner role on the top-level group, as a signed-in session or as a token of that account. GitLab documents that group Owners can always access group settings, also from an address that is not on the allowlist.
  • Log collection: audit event streaming (Ultimate) for the top-level group or the instance, to an HTTP destination, received as JSON. All five event types have the Group scope.

Impact

A wider or emptied IP allowlist lets sessions, access tokens, deploy keys and deploy tokens reach the group's projects from addresses outside the organization's network, which removes the control that made a stolen token useless elsewhere. An added email domain lets accounts with addresses of that domain be added as members. Switching off the restriction on personal access tokens or SSH keys gives enterprise users long-lived credentials again, and removing the step-up requirement removes a second check before the group is opened.

Detection rules

GitLab Group Allowed Email Domain Changed

Detects the audit event type allowed_email_domain_updated (GitLab 17.5 and later), which GitLab writes when an allowed email domain entry of a group is updated. The email domain allowlist of a top-level group restricts membership: a user's primary email domain must match an entry to access the group and its projects, and subgroups inherit the list. An added domain lets accounts with addresses of that domain be added as members. The event type reference lists the event without its fields, so the rule matches on the event type and cannot tell an added domain from a removed one. Read the current list in the group settings.

LevelMediumStatusExperimentalLog sourceGitLab audit events
title: GitLab Group Allowed Email Domain Changed
id: 8a7a7e26-b3c6-4cd6-b32b-3b406951bbdb
status: experimental
description: >-
  Detects the audit event type allowed_email_domain_updated (GitLab 17.5
  and later), which GitLab writes when an allowed email domain entry of
  a group is updated. The email domain allowlist of a top-level group
  restricts membership: a user's primary email domain must match an
  entry to access the group and its projects, and subgroups inherit the
  list. An added domain lets accounts with addresses of that domain be
  added as members. The event type reference lists the event without its
  fields, so the rule matches on the event type and cannot tell an added
  domain from a removed one. Read the current list in the group
  settings.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/user/group/access_and_permissions/
  - https://attack.mitre.org/techniques/T1556/009/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.persistence
  - attack.t1556.009
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: allowed_email_domain_updated
  condition: selection
falsepositives:
  - A new company domain after a merger or a rebrand, or the domain of a contractor that was approved. Confirm with the Owner of the group.
  - Removal of a domain, which tightens the restriction. GitLab notes that it does not remove existing members with that domain.
level: medium

False positives

  • A new company domain after a merger or a rebrand, or the domain of a contractor that was approved. Confirm with the Owner of the group.
  • Removal of a domain, which tightens the restriction. GitLab notes that it does not remove existing members with that domain.

GitLab Group Authentication Restriction Setting Changed

Detects a change of three group settings that restrict how users authenticate. disable_personal_access_tokens_updated (GitLab 17.4 and later) is the setting Disable personal access tokens, which stops the enterprise users of a group from creating personal access tokens and disables their existing ones. disable_ssh_keys_updated (GitLab 18.6 and later) is the setting Disable SSH Keys. step_up_auth_required_oauth_provider_updated (GitLab 18.4 and later) is the step-up authentication provider that users must pass before they access the group. Switching one of them off gives long-lived credentials back or removes a second check. The event type reference lists the events without their fields, so the rule matches on the event type in both directions. Read the settings to see which way the change went.

LevelMediumStatusExperimentalLog sourceGitLab audit events
title: GitLab Group Authentication Restriction Setting Changed
id: 651f4ab1-3bf4-440b-a8a8-e242a2a37ce9
status: experimental
description: >-
  Detects a change of three group settings that restrict how users
  authenticate. disable_personal_access_tokens_updated (GitLab 17.4 and
  later) is the setting Disable personal access tokens, which stops the
  enterprise users of a group from creating personal access tokens and
  disables their existing ones. disable_ssh_keys_updated (GitLab 18.6
  and later) is the setting Disable SSH Keys.
  step_up_auth_required_oauth_provider_updated (GitLab 18.4 and later)
  is the step-up authentication provider that users must pass before
  they access the group. Switching one of them off gives long-lived
  credentials back or removes a second check. The event type reference
  lists the events without their fields, so the rule matches on the
  event type in both directions. Read the settings to see which way the
  change went.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/user/enterprise_user/
  - https://docs.gitlab.com/user/profile/personal_access_tokens/
  - https://docs.gitlab.com/administration/auth/oidc/
  - https://attack.mitre.org/techniques/T1556/009/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.persistence
  - attack.t1556.009
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type:
      - disable_personal_access_tokens_updated
      - disable_ssh_keys_updated
      - step_up_auth_required_oauth_provider_updated
  condition: selection
falsepositives:
  - An Owner who turns a restriction on, which is a hardening step with the same event type. Close the alert once the setting is confirmed.
  - A planned exception, for example personal access tokens for a migration. Confirm that it has an end date.
level: medium

False positives

  • An Owner who turns a restriction on, which is a hardening step with the same event type. Close the alert once the setting is confirmed.
  • A planned exception, for example personal access tokens for a migration. Confirm that it has an end date.

GitLab Group IP Allowlist Changed

Detects the audit event type ip_restrictions_changed, which GitLab describes as any changes in the IP allowlist of a group. The allowlist of a top-level group limits the GitLab UI, the API and Git operations to the listed address ranges, and it applies to access tokens, service accounts, deploy keys and deploy tokens as well. A range that is added, or a list that is emptied, opens the group's projects to addresses outside the organization's network. Group Owners can reach the group settings from any address. The event type reference lists the event without its fields, so the rule matches on the event type and cannot tell an added range from a removed one. Compare the setting with the approved list.

LevelMediumStatusExperimentalLog sourceGitLab audit events
title: GitLab Group IP Allowlist Changed
id: 89428936-59c2-401f-bac8-cf4a642843d5
status: experimental
description: >-
  Detects the audit event type ip_restrictions_changed, which GitLab
  describes as any changes in the IP allowlist of a group. The allowlist
  of a top-level group limits the GitLab UI, the API and Git operations
  to the listed address ranges, and it applies to access tokens, service
  accounts, deploy keys and deploy tokens as well. A range that is added,
  or a list that is emptied, opens the group's projects to addresses
  outside the organization's network. Group Owners can reach the group
  settings from any address. The event type reference lists the event
  without its fields, so the rule matches on the event type and cannot
  tell an added range from a removed one. Compare the setting with the
  approved list.
references:
  - https://docs.gitlab.com/user/compliance/audit_event_types/
  - https://docs.gitlab.com/user/group/access_and_permissions/
  - https://attack.mitre.org/techniques/T1556/009/
author: Forestall
date: 2026-11-18
tags:
  - attack.defense-impairment
  - attack.persistence
  - attack.t1556.009
logsource:
  product: gitlab
  service: audit
detection:
  selection:
    event_type: ip_restrictions_changed
  condition: selection
falsepositives:
  - Planned changes, for example a new office range, a new VPN exit or the address of a runner. The allowlist changes rarely, so confirm each change against a change request.
  - Removal of a range that is no longer used, which tightens the restriction. The event type is the same.
level: medium

False positives

  • Planned changes, for example a new office range, a new VPN exit or the address of a runner. The allowlist changes rarely, so confirm each change against a change request.
  • Removal of a range that is no longer used, which tightens the restriction. The event type is the same.

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.

IP allowlist changed from an address outside the organization's ranges

Detection hypothesisNeeds your own lists

Owners can reach the group settings from any address, so the allowlist can be edited from outside the network it describes. A change of the allowlist whose own source address is not one of the organization's ranges is what an attacker with a stolen Owner session produces when adding their address.

  1. The allowlist changes: the audit event type ip_restrictions_changed. Read ip_address, author_id and entity_path.
  2. Compare ip_address with your own list of office, VPN and automation ranges, which should be the ranges that were on the allowlist before.
  3. Alert when the address is not on that list, then look for user_signed_in_from_unseen_ip for the same account (GitLab 19.0 and later) around the time of the change.

Eventsip_restrictions_changeduser_signed_in_from_unseen_ip

LimitsThe address in the event is the one GitLab saw, so behind a proxy that does not pass the client address every change has the proxy address. An Owner who works from home without the VPN produces the same event. The comparison needs a list of ranges that you keep current.

Triage

  • Identify who made the change (author_name, author_id) and from which address (ip_address), and the group (entity_path).
  • Open Settings, General, Permissions and group features of the group and compare the address ranges, the email domains and the restrictions with the approved values. The details object of the event may carry the old and the new value, but it has no defined schema.
  • Check whether the address of the change itself belongs to the organization. A change of the allowlist that was made from an outside address is a strong sign.
  • Ask the Owner through a separate channel whether the change was theirs, and look for a change request.
  • Look at what followed. Sign-ins and token use from unseen addresses (user_signed_in_from_unseen_ip, personal_access_token_used_from_unseen_ip), new members (member_created), new tokens and SSH keys (personal_access_token_created, add_ssh_key).

Response

Once the attack is confirmed:

  1. Set the IP allowlist, the allowed email domains and the authentication restrictions back to the approved values.
  2. Treat the Owner account that made the change as compromised. Reset its password and second factor, end its sessions and revoke its tokens.
  3. Review the access to the group from the addresses that were added, for the time the change was in force, and revoke the tokens that were used from there.
  4. Remove the members that were added after an email domain was allowed. GitLab notes that removing a domain from the list does not remove existing users with that domain.
  5. Revoke the personal access tokens and delete the SSH keys that were created while their restriction was off.

Mitigation

  • Keep the Owner role on the top-level group to a few named people with two-factor authentication, because Owners can change these settings from any address.
  • Record the approved address ranges, email domains and authentication restrictions of each top-level group, and compare the settings with that record on a schedule.
  • Configure the X-Forwarded-For header as GitLab describes for IP restriction, so that a client cannot present an allowed address of its choice.
  • Stream audit events to your SIEM and alert on every change of the IP allowlist, the allowed email domains and the authentication restrictions.

Frequently asked questions

Can a group Owner change the IP allowlist from an address that is not on it?

Yes. In its list of security implications GitLab states that administrators and group Owners can always access group settings when they come from a disallowed IP address. The allowlist therefore does not protect itself. An attacker with an Owner session can add their own range from anywhere, which is why the address in the change event deserves a look.

Does the event say whether an address range was added or removed?

Not in a documented field. GitLab describes `ip_restrictions_changed` as any changes in the IP allowlist, and the event type reference lists it without its fields. The `details` object of an audit event has no defined schema. Open the group settings to read the current list and compare it with the approved one.

What does the IP restriction of a group cover?

GitLab says the setting applies to the GitLab UI of the group, its subgroups and projects, to the API and to Git operations, and that it applies to project and group access tokens, service accounts, deploy keys and deploy tokens. GitLab also calls it not a complete firewall and lists exceptions, for example that users can always view the names and hierarchies of groups and projects.

Is there a public incident report for this technique in GitLab?

No public incident report describes this at the audit event level. The page follows what GitLab documents about these group settings and who can change them. The rules match on the event types alone, so every alert needs a look at the settings to see what was changed.

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.