CVE-2026-6970: authd Primary Group ID Is Incorrectly Vulnerability

HIGH
Advisory Identifier: GHSA-fg3j-5w9g-hmg7
CWE-842
Published
Advisory Summary

CVE-2026-6970 is a HIGH primary group id is incorrectly vulnerability (CWE-842: Placement of User into Incorrect Group) affecting authd libraries in the Go ecosystem. The issue involves primary group id is incorrectly set to value of uid. Remediation is available by upgrading affected packages to version 0.6.4.

CVE-2026-6970 at a Glance

CVE Identifier CVE-2026-6970
GHSA Identifier GHSA-fg3j-5w9g-hmg7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-842: Placement of User into Incorrect Group
Affected Product authd
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-6970

To remediate this vulnerability, upgrade all affected authd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/canonical/authd fixed: 0.6.4
Upgrade github.com/canonical/authd to 0.6.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/canonical/authd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-6970, inspect your project dependencies for authd:

inspect dependencies for github.com/canonical/authd

Analyze the terminal output to locate any version of authd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.4), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-842: Placement of User into Incorrect Group, where the product or the administrator places a user into an incorrect group. In authd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

authd 0.6.0 contains [a bug](https://github.com/canonical/authd/issues/1482) which can lead to an incorrect primary group ID. It affects users whose primary group ID (i.e. the GID in the user record) differs from their UID. There are two ways which can lead to this: 1. The user was created with authd < 0.5.4 (released June 2025). Those users were created with UID != GID. 2. The primary group of the user was modified manually with the authctl utility that is shipped with authd (`authctl group set-gid`). Another condition is that some user information must have changed in the identity provider (else the user record is not updated upon login). If that is the case, the next time an affected user logs in, authd will set their primary group ID to their UID. This could lead to local privileges escalation. Also, files and directories created by those users will be owned by that incorrect primary group, which may grant other local users access to those files which they shouldn't have. Users who are affected by the issue can run this script to fix the primary group ID of all authd users and the file ownership of files in the home directory created with the incorrect GID: ```bash authd_users=$(getent passwd --service authd | cut -d: -f1) for user in $authd_users; do OLD_GID=$(id -g "$user") GID=$(getent group "$user" | cut -d: -f3) if [ -z "$GID" ]; then echo "Warning: could not determine GID for $user, skipping" >&2 continue fi if [ "$OLD_GID" = "$GID" ]; then continue # user not affected fi USER_HOME=$(getent passwd "$user" | cut -d: -f6) echo "Fixing $user: resetting GID from $OLD_GID to $GID" sudo authctl group set-gid "$user" "$OLD_GID" sudo authctl group set-gid "$user" "$GID" sudo chown -R --from=":$OLD_GID" ":$GID" "$USER_HOME" done ``` After applying the fix, affected users must log out and log back in for `id`, `groups`, and new file GID stamping to reflect the corrected primary group. You may also optionally terminate a user's active session with: ```bash sudo loginctl terminate-user "$user" ``` If the users also own files outside their home directory, the ownership of those files might have to be updated as well. Fixed by: https://github.com/canonical/authd/commit/154b428305cb1a7a19c897626fefd09d6dde8b9f

CVE-2026-6970 Affected authd Versions

1 component(s)
Fixed Versions:
0.6.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/canonical/authd
Go
≥ 0.6.0
< 0.6.4
0.6.4

References

Frequently Asked Questions

What is CVE-2026-6970?
CVE-2026-6970 is a security vulnerability in authd involving Primary group ID is incorrectly set to value of UID under CWE-842: Placement of User into Incorrect Group.
Which authd versions are affected?
Affected versions include releases prior to 0.6.4 across affected packages: github.com/canonical/authd.
What version fixes CVE-2026-6970?
Upgrading to 0.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/canonical/authd affected?
Yes, github.com/canonical/authd is affected in releases prior to 0.6.4. Upgrade your dependency to 0.6.4 or later.
What CWE is associated with CVE-2026-6970?
CVE-2026-6970 is classified under CWE-842: Placement of User into Incorrect Group (The product or the administrator places a user into an incorrect group.).
How can I check Go dependencies for CVE-2026-6970?
Run the dependency tree command: 'inspect dependencies for github.com/canonical/authd'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fg3j-5w9g-hmg7",
  "modified" : "2026-05-05T22:04:07Z",
  "published" : "2026-05-05T22:04:07Z",
  "aliases" : [ "CVE-2026-6970" ],
  "summary" : "authd: Primary group ID is incorrectly set to value of UID ",
  "details" : "authd 0.6.0 contains [a bug](https://github.com/canonical/authd/issues/1482) which can lead to an incorrect primary group ID.\n\nIt affects users whose primary group ID (i.e. the GID in the user record) differs from their UID. There are two ways which can lead to this:\n\n1. The user was created with authd < 0.5.4 (released June 2025). Those users were created with UID != GID.\n\n2. The primary group of the user was modified manually with the authctl utility that is shipped with authd (`authctl group set-gid`).\n\nAnother condition is that some user information must have changed in the identity provider (else the user record is not updated upon login). If that is the case, the next time an affected user logs in, authd will set their primary group ID to their UID.\n\nThis could lead to local privileges escalation. Also, files and directories created by those users will be owned by that incorrect primary group, which may grant other local users access to those files which they shouldn't have.\n\nUsers who are affected by the issue can run this script to fix the primary group ID of all authd users and the file ownership of files in the home directory created with the incorrect GID:\n\n```bash\nauthd_users=$(getent passwd --service authd | cut -d: -f1)\nfor user in $authd_users; do\n    OLD_GID=$(id -g \"$user\")\n    GID=$(getent group \"$user\" | cut -d: -f3)\n    if [ -z \"$GID\" ]; then\n        echo \"Warning: could not determine GID for $user, skipping\" >&2\n        continue\n    fi\n    if [ \"$OLD_GID\" = \"$GID\" ]; then\n        continue  # user not affected\n    fi\n    USER_HOME=$(getent passwd \"$user\" | cut -d: -f6)\n    echo \"Fixing $user: resetting GID from $OLD_GID to $GID\"\n    sudo authctl group set-gid \"$user\" \"$OLD_GID\"\n    sudo authctl group set-gid \"$user\" \"$GID\"\n    sudo chown -R --from=\":$OLD_GID\" \":$GID\" \"$USER_HOME\"\ndone\n```\n\nAfter applying the fix, affected users must log out and log back in for `id`, `groups`, and new file GID stamping to reflect the corrected primary group. You may also optionally terminate a user's active session with:\n\n```bash\nsudo loginctl terminate-user \"$user\"\n```\n\nIf the users also own files outside their home directory, the ownership of those files might have to be updated as well.\n\nFixed by: https://github.com/canonical/authd/commit/154b428305cb1a7a19c897626fefd09d6dde8b9f",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/canonical/authd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.6.0"
      }, {
        "fixed" : "0.6.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/canonical/authd/security/advisories/GHSA-fg3j-5w9g-hmg7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-6970"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/canonical/authd/commit/154b428305cb1a7a19c897626fefd09d6dde8b9f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/canonical/authd"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-842" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-05T22:04:07Z",
    "nvd_published_at" : "2026-04-27T16:16:46Z"
  }
}