Vulnerabilities in pkg:golang/github.com/canonical/authd
PACKAGECVE-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.
pkg:golang/github.com/canonical/authd
Vulnerability advisories affecting package pkg:golang/github.com/canonical/authd. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-fg3j-5w9g-hmg7 | CVE-2026-6970 | HIGH | authd: Primary group ID is incorrectly set to value of UID |
CVE-2026-6970 at a Glance
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.
Upgrade github.com/canonical/authd to 0.6.4
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
CVE-2026-6970 Affected authd Versions
1 component(s)| 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?
Which authd versions are affected?
What version fixes CVE-2026-6970?
Is github.com/canonical/authd affected?
What CWE is associated with CVE-2026-6970?
How can I check Go dependencies for CVE-2026-6970?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}