GitLabApplication

CVE-2021-39897

MEDIUM · 5.3 CVSS v3.1 Published 2021-11-05
Fix available
A fix is available. Upgrade to 12.9.8 / 12.10.7 or later.
See remediation →
62/100
Remediation priority · Elevated
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Improper access control in GitLab CE/EE version 10.5 and above allowed subgroup members with inherited access to a project from a parent group to still have access even after the subgroup is transferred

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

In GitLab CE/EE versions 10.5 and above, improper access control allows subgroup members who inherited project access from a parent group to retain that access even after the subgroup is transferred to a different namespace. This occurs because the inherited access permissions are not properly revoked during the subgroup transfer operation.

MitigationUpgrade GitLab to the latest patched version and audit group/project memberships after any subgroup transfers to ensure access is correctly scoped.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
GitLabApplication
Affected:>= 12.9.0, < 12.9.8>= 12.10.0, < 12.10.7= 13.0.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed GitLab version
    Run `sudo gitlab-rake gitlab:env:info` or check the GitLab admin area under /help/version to obtain the exact version number. Compare this version against the affected ranges: >= 12.9.0 and < 12.9.8; >= 12.10.0 and < 12.10.7; or version 13.0.0.
    Affected if The installed version matches any of the affected version ranges.
  2. Identify subgroup transfer operations
    Review GitLab audit logs for events involving subgroup transfers. Look for audit events of type 'group_transfer' or similar where a subgroup was moved to a different parent namespace. This can be done via the GitLab admin area under the Audit Events section, or via API queries.
    Affected if Any subgroup has been transferred to a different namespace in the affected versions.
  3. Locate subgroups with inherited parent group access
    In GitLab, navigate to Groups > Subgroups and identify subgroups that have members who gained access through inheritance from a parent group. Check the group settings under Members > Group members to identify members with 'inherited' access type.
    Affected if There are subgroups whose members include inherited members from a parent group.
  4. Verify access revocation after transfer
    For each subgroup that was transferred, compare the member list BEFORE and AFTER the transfer. Check if members who inherited access from the original parent group still retain access after the transfer. Inspect the current subgroup membership and cross-reference with the original parent group memberships.
    Affected if Members who inherited access from the original parent group still appear in the subgroup membership after the transfer occurred.

Your environment is affected if you are running an affected GitLab version AND have performed subgroup transfers, with members who inherited access from a parent group retaining that access after the transfer.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 12.9.8 / 12.10.7 or later
Fixed in 12.9.812.10.7
Interim mitigation

Upgrade GitLab to the latest patched version and audit group/project memberships after any subgroup transfers to ensure access is correctly scoped.

Recommended fix High confidence

GitLab 13.0.1 or later (preferably latest stable release)

  1. 1. Back up your GitLab instance database and repositories before proceeding with the upgrade
  2. 2. Review GitLab upgrade documentation for your current version to ensure you follow the correct upgrade path
  3. 3. Upgrade GitLab to version 12.9.8 or later if on the 12.9.x line
  4. 4. Upgrade GitLab to version 12.10.7 or later if on the 12.10.x line
  5. 5. Upgrade GitLab to version 13.0.1 or later if on the 13.0.x line
  6. 6. Alternatively, upgrade to the latest stable GitLab release to include all security fixes
  7. 7. After upgrade, verify that users who had access via inherited subgroup permissions before transfer no longer have unauthorized access
  8. 8. Review project access settings in GitLab admin panel to confirm access controls are functioning correctly
Caveat Review GitLab release notes for potential breaking changes between your current version and target version, especially when jumping multiple minor versions

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in GitLab Scoped from the published advisory
  • Consultation3.0 h
  • Implementation4.0 h
  • Testing2.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,980
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,168.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2021-39897 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2021-39897 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data