CVE-2025-5689

8.5 HIGH

📋 TL;DR

This vulnerability in Ubuntu's authd service incorrectly assigns root group membership to first-time SSH users during pre-authentication. This allows unauthorized privilege escalation, affecting Ubuntu systems using authd for SSH authentication.

💻 Affected Systems

Products:
  • Ubuntu authd
Versions: Versions prior to the fix
Operating Systems: Ubuntu Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using authd for SSH authentication with first-time user logins.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker gains root-level access to the system through SSH, enabling complete system compromise, data theft, and lateral movement.

🟠

Likely Case

Unauthorized users gain elevated privileges to access sensitive files, modify system configurations, or install malicious software.

🟢

If Mitigated

With proper network segmentation and least privilege controls, impact is limited to the affected SSH session and specific services.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires valid SSH credentials but no special technical skills.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check Ubuntu security advisory for specific version

Vendor Advisory: https://github.com/ubuntu/authd/security/advisories/GHSA-g8qw-mgjx-rwjr

Restart Required: Yes

Instructions:

1. Update system packages: sudo apt update && sudo apt upgrade
2. Specifically update authd package if available separately
3. Restart SSH service: sudo systemctl restart ssh

🔧 Temporary Workarounds

Disable authd for SSH

linux

Configure SSH to use alternative authentication methods instead of authd

Edit /etc/ssh/sshd_config to remove authd references
Restart SSH: sudo systemctl restart ssh

🧯 If You Can't Patch

  • Restrict SSH access to trusted networks only using firewall rules
  • Implement multi-factor authentication for SSH access

🔍 How to Verify

Check if Vulnerable:

Check if authd is configured for SSH authentication and test first-time user login group assignment

Check Version:

dpkg -l | grep authd

Verify Fix Applied:

Verify authd package version is updated and test that first-time users no longer get root group membership

📡 Detection & Monitoring

Log Indicators:

  • Unusual SSH login patterns for first-time users
  • Unexpected root group assignments in auth logs

Network Indicators:

  • SSH connections from unexpected sources followed by privilege escalation attempts

SIEM Query:

source="auth.log" AND "Accepted publickey" AND "first-time" AND "gid=0"

🔗 References

📤 Share & Export