Skip to main content

CVE-2024-9313 — Vulnerability in github.com/ubuntu/authd — CVE Details

HIGH

PAM module may allow accessing with the credentials of another user

Published October 3, 2024Updated January 21, 2025Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.00%). Schedule for your next planned update.

Does your project use an affected github.com/ubuntu/authd version?

Paste your go.sum to check it for CVE-2024-9313 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

Summary

Authd PAM module up to version 0.3.4 can allow broker-managed users to impersonate any other user managed by the same broker and perform any PAM operation with it, including authenticating as them.

This is possible using tools such as su, sudo or ssh (and potentially others) that, so far, do not ensure that the PAM user at the end of the transaction is matching the one who initiated the transaction.

Authd 0.3.5 fixes this by not allowing changing the user unless it was never set before in the PAM stack.

su version that will include https://github.com/util-linux/util-linux/pull/3206 will not be affected ssh version that will include https://github.com/openssh/openssh-portable/pull/521 will not be affected sudo version that will include https://github.com/sudo-project/sudo/pull/412 will not be affected login not affected passwd not affected

Summary

An user can access as another user using its own credentials

Details

I feel we’ve a security issue that is due to the fact that we allow changing the user in the cases in which that’s already provided by PAM, I’ve not tested this using the entra-id broker but it’s reproducible with the example one, but unless I’m missing something it should be independent from the broker in use.

Basically, by going to the user selection page we allow to login as any user by entering the use own credentials.

See for example: https://asciinema.org/a/VIcjpDImomaGu0wxsJJxNdmlf or https://asciinema.org/a/CV3D1gaEhn2yclqSMKCnifYPo

Basically it’s possible to logging in as user1 using the credentials of user2 or user3.

The issue doesn’t affect login or passwd, but it does affect su and sshd, since in both cases they don’t check if the PAM_USER changed before the final authentication.

Now, while those tools should likely be fixed to only read the PAM_USER once pam gave them the final ok, I think authd should not allow changing the user at all when it has been provided by PAM.

Advisory Timeline

  • First published October 3, 2024 (784 days ago).
  • Last revised January 21, 2025 — 110 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/ubuntu/authd to 0.3.5 or later
go get github.com/ubuntu/authd@v0.3.5
Go
Update github.com/ubuntu/authd to 0.0.0-20240930103526-63e527496b01 or later
go get github.com/ubuntu/authd@v0.0.0-20240930103526-63e527496b01

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Go (1).

PackageFixed In
github.com/ubuntu/authd Go · Affected: All versions0.3.5
github.com/ubuntu/authd Go · Affected: All versions0.0.0-20240930103526-63e527496b01

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-287
    Improper AuthenticationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

Frequently Asked Questions

What is CVE-2024-9313?
PAM module may allow accessing with the credentials of another user. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.8/10).
How do I check if my project is affected by CVE-2024-9313?
CVE-2024-9313 affects github.com/ubuntu/authd. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-9313 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.8

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
1.00%
EPSS percentile: 61.8

This is an above-median EPSS score — 61.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-x5q3-c8rm-w787
GO-2024-3181

Related CVEs

  • CVE-2026-12249
    CRITICAL

    Canonical ADSys Uses a Less Trusted Source

  • CVE-2026-108262
    HIGH

    DDEV incomplete tar symlink traversal fix allows host file overwrite - Incomplete fix of CVE-2026-32885

  • CVE-2026-130007
    HIGH

    k8s-mcp-server: Missing authentication on default SSE/HTTP transport allows unauthenticated Kubernetes tool execution

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum