Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go

GHSA-x5q3-c8rm-w787

HIGH

GHSA-x5q3-c8rm-w787 is a high-severity (CVSS 8.8) vulnerability in github.com/ubuntu/authd. O3 Security confirms whether GHSA-x5q3-c8rm-w787 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

PAM module may allow accessing with the credentials of another user

Also known asCVE-2024-9313GO-2024-3181
Published
Oct 3, 2024
Updated
Jan 21, 2025
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed

Blast Radius

2 pkgs affected
🐹github.com/ubuntu/authd🐹github.com/ubuntu/authd

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

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

<details> <summary>Old report</summary>

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.

</details>

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/ubuntu/authdall versions0.0.0-20240930103526-63e527496b01
🐹Gogithub.com/ubuntu/authd0.1.0&&< 0.3.50.3.5

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/ubuntu/authd. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update github.com/ubuntu/authd to 0.0.0-20240930103526-63e527496b01 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-x5q3-c8rm-w787 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-x5q3-c8rm-w787 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-x5q3-c8rm-w787. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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
O3 Security · Impact-Aware SCA

Is GHSA-x5q3-c8rm-w787 in your dependencies?

O3 detects GHSA-x5q3-c8rm-w787 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.