IT Security 1 month ago

USN-8804-1: Critical OpenSSH Vulnerabilities Impacting Ubuntu LTS Releases

USN-8804-1 outlines ten critical and high‑severity OpenSSH vulnerabilities across Ubuntu 14.04, 18.04 and 20.04 LTS, detailing exploitation scenarios, detection methods, and immediate patching instructions. USN-8804-1 outlines ten critical and high‑severity OpenSSH vulnerabilities across Ubuntu 14.04, 18.04 and 20.04 LTS, detailing exploitation scenarios, detection methods, and immediate patching instructions.

IT Security

Executive Summary

Ubuntu Security Notice USN-8804-1 addresses 10 critical and high-severity vulnerabilities in OpenSSH affecting Ubuntu 14.04 LTS, 18.04 LTS, and 20.04 LTS. These flaws enable arbitrary code execution, unauthorized access, denial of service attacks, and security bypass conditions. Immediate patching is required for all affected systems.


Which Ubuntu Versions Are Affected

Ubuntu 14.04 LTS vulnerabilities

Ubuntu 14.04 LTS is affected by two critical vulnerabilities:

  • CVE-2026-35386: Remote code execution via shell metacharacters in usernames under non-default configurations
  • CVE-2026-35414: Principal restriction bypass in authorized_keys files

While this release reaches end-of-life in April 2024, organizations maintaining legacy systems require immediate attention to these flaws.

Ubuntu 18.04 LTS vulnerabilities

Ubuntu 18.04 LTS (Standard Support until April 2023, Extended Security Maintenance available) is impacted by:

  • CVE-2026-35414: Principal restriction bypass in authorized_keys
  • CVE-2026-59999: Tunnel creation despite DisableForwarding and PermitTunnel concurrent usage

Ubuntu 20.04 LTS vulnerabilities

Ubuntu 20.04 LTS (supported until April 2025) faces the broadest vulnerability exposure:

  • CVE-2026-35414: Principal restriction bypass
  • CVE-2026-59999: Forwarding restriction bypass
  • CVE-2026-60001: Weakened brute-force protection via authentication delay bypass

Cross-version CVE impact

Additional CVEs affect OpenSSH across all three LTS versions:

  • CVE-2026-35387: ECDSA algorithm restriction bypass
  • CVE-2026-59995: SFTP path traversal vulnerability
  • CVE-2026-59997: internal-sftp argument handling flaw
  • CVE-2026-59998: Windows Active Directory GSSAPI bypass
  • CVE-2026-60000: GSSAPI exhaustion denial of service
  • CVE-2026-73282: Use-after-free in remote forwarding operations

Critical Vulnerabilities Explained

CVE-2026-35386: Remote code execution via username metacharacters

Severity: Critical
Affected: Ubuntu 14.04 LTS

OpenSSH fails to properly sanitize shell metacharacters in usernames when non-default configurations are active. An attacker crafting a username containing shell special characters (e.g., $(command), `command`, or |command) can achieve arbitrary command execution on the target system.

Technical Details: The vulnerability exists in username parsing logic that does not escape metacharacters before passing them to shell processing routines. This only manifests in configurations deviating from OpenSSH defaults.

CVE-2026-35414: Principal restriction bypass in authorized_keys

Severity: Critical
Affected: Ubuntu 14.04 LTS, 18.04 LTS, 20.04 LTS

The authorized_keys file supports principal restrictions to limit which principals can use a specific public key. OpenSSH incorrectly validates these restrictions, allowing attackers to bypass principal checks and authenticate as unintended users.

Technical Details: Principal validation occurs after key acceptance rather than before, creating a race condition where authentication succeeds despite principal mismatch.

CVE-2026-73282: Use-after-free in remote forwarding operations

Severity: Critical
Affected: All versions

Concurrent remote forwarding operations trigger a use-after-free condition in memory management. Attackers can exploit race conditions by initiating multiple simultaneous forwarding requests, leading to either denial of service or arbitrary code execution.

Technical Details: The vulnerability occurs when forwarding operation cleanup runs concurrently with active forwarding requests, freeing memory still referenced by active operations.

CVE-2026-59999: Tunnel creation despite forwarding restrictions

Severity: High
Affected: Ubuntu 18.04 LTS, 20.04 LTS

When both DisableForwarding and PermitTunnel directives are configured simultaneously, OpenSSH fails to properly enforce forwarding restrictions. Attackers can create tunnels despite the intended prohibition.

Technical Details: The configuration parser does not detect conflicting directives, allowing tunnel creation to proceed when both settings are active.

CVE-2026-60000: Denial of service via GSSAPI exhaustion

Severity: High
Affected: All versions

OpenSSH does not properly limit GSSAPI authentication attempts. An attacker can initiate excessive GSSAPI authentication requests, consuming system memory and CPU resources until the SSH service becomes unresponsive.

Technical Details: Each GSSAPI authentication attempt allocates resources without enforcing per-connection or per-user limits, enabling resource exhaustion attacks.

CVE-2026-60001: Weakened brute-force protection on Ubuntu 20.04

Severity: Medium
Affected: Ubuntu 20.04 LTS

OpenSSH implements a minimum delay between authentication attempts to prevent brute-force attacks. On Ubuntu 20.04 LTS, this delay is not consistently enforced, allowing attackers to perform rapid credential guessing.

Technical Details: The delay enforcement logic contains a timing window where rapid successive attempts bypass the intended protection mechanism.


Attack Vectors and Real-World Scenarios

Remote code execution pathways

Scenario 1: Non-default Configuration Exploitation

An organization runs Ubuntu 14.04 LTS with a custom OpenSSH configuration that parses usernames through shell processing. An attacker submits a login attempt with username admin$(whoami). The shell metacharacter is not escaped, resulting in command execution with SSH daemon privileges.

Scenario 2: Use-After-Free Race Condition

An attacker establishes an SSH connection and rapidly initiates multiple concurrent remote forwarding operations (ssh -R). The timing of cleanup operations and active forwarding requests creates a use-after-free condition, allowing the attacker to write to freed memory and execute arbitrary code.

Access control bypass techniques

Scenario 3: Principal Restriction Bypass

An organization configures authorized_keys with principal restrictions:

principals="admin-only" ssh-rsa AAAA...

An attacker obtains this public key and exploits CVE-2026-35414 to authenticate as a non-admin user. The principal restriction is bypassed due to improper validation timing.

Scenario 4: Active Directory GSSAPI Bypass

A Windows-integrated environment uses OpenSSH with GSSAPI authentication against Active Directory. An attacker exploits CVE-2026-59998 by manipulating GSSAPI negotiation when GSSAPIStrictAcceptorCheck is misconfigured, gaining unauthorized access without valid credentials.

Malicious SFTP server exploitation

Scenario 5: Path Traversal File Overwrite

A user connects to an untrusted SFTP server to download files. The malicious server responds with path traversal sequences in filenames (e.g., ../../etc/passwd). OpenSSH fails to validate the download path, writing the file outside the intended directory and potentially overwriting critical system files.

Denial of service and brute-force acceleration

Scenario 6: GSSAPI Resource Exhaustion

An attacker sends thousands of GSSAPI authentication requests to an OpenSSH server. Each request allocates memory without proper limits. Within minutes, the server exhausts available memory and becomes unresponsive to legitimate users.

Scenario 7: Rapid Brute-Force on Ubuntu 20.04

An attacker targets Ubuntu 20.04 LTS and exploits CVE-2026-60001 to bypass authentication delays. Instead of waiting seconds between attempts, the attacker performs credential guessing at millisecond intervals, dramatically increasing the likelihood of successful compromise.


Risk Assessment by Severity Level

Risk assessment matrix showing critical vulnerabilities enabling code execution and unauthorized access, with high-risk security bypasses and denial of service flaws.
Risk assessment matrix showing critical vulnerabilities enabling code execution and unauthorized access, with high-risk security bypasses and denial of service flaws.

Critical-risk vulnerabilities (code execution and unauthorized access)

CVE-2026-35386 and CVE-2026-73282 enable arbitrary code execution with SSH daemon privileges. An attacker gaining code execution can:

  • Install persistent backdoors
  • Exfiltrate sensitive data
  • Pivot to internal network resources
  • Modify system configurations

CVE-2026-35414 and CVE-2026-59998 bypass authentication controls, allowing unauthorized system access. Impact includes:

  • Unauthorized data access
  • Lateral movement within networks
  • Privilege escalation opportunities
  • Compliance violations

Risk Rating: CRITICAL – Immediate patching required. These vulnerabilities directly compromise system confidentiality, integrity, and availability.

High-risk vulnerabilities (security bypasses and DoS)

CVE-2026-35387, CVE-2026-59997, and CVE-2026-59999 bypass intended security restrictions:

  • Unintended algorithm acceptance weakens cryptographic protections
  • Forwarding restrictions can be circumvented
  • SFTP security arguments are ignored

CVE-2026-60000 enables denial of service through resource exhaustion, impacting service availability for legitimate users.

Risk Rating: HIGH – These vulnerabilities require patching within 48-72 hours. They enable attackers to circumvent security controls or disrupt service availability.

Moderate-risk vulnerabilities (brute-force weakening)

CVE-2026-60001 weakens brute-force protection on Ubuntu 20.04 LTS by allowing rapid authentication attempts. While this does not directly enable code execution, it significantly increases the likelihood of successful credential compromise.

Risk Rating: MEDIUM – Patch within 1-2 weeks. Implement compensating controls such as account lockout policies and intrusion detection.


How to Detect Exploitation Attempts

SSH authentication log indicators

Monitor /var/log/auth.log for suspicious patterns:

# Search for usernames containing shell metacharacters
grep -E 'Invalid user.*[\$\`\|]' /var/log/auth.log
# Identify rapid authentication attempts
grep "Failed password" /var/log/auth.log | \
  awk '{print $1, $2, $3, $9}' | \
  sort | uniq -c | sort -rn | head -20

Indicators of CVE-2026-35386 exploitation: Usernames containing $, backticks, pipes, or semicolons in authentication logs.

Indicators of CVE-2026-60001 exploitation: Multiple failed authentication attempts from the same source within sub-second intervals.

GSSAPI attempt frequency monitoring

# Monitor GSSAPI authentication attempts
grep "gssapi" /var/log/auth.log | \
  awk '{print $9}' | sort | uniq -c | sort -rn
# Alert if single source exceeds threshold (e.g., >100 attempts/minute)

Indicators of CVE-2026-60000 exploitation: Sustained high-frequency GSSAPI authentication attempts from single or multiple sources.

Rapid connection attempt detection

# Identify sources with excessive connection attempts
netstat -an | grep :22 | awk '{print $5}' | \
  cut -d: -f1 | sort | uniq -c | sort -rn | head -10

Indicators of brute-force attacks: Single source IP establishing >50 connections/minute to SSH port.

Configuration audit checklist

Review /etc/ssh/sshd_config for risky settings:

# Check for concurrent DisableForwarding and PermitTunnel
grep -E "^(DisableForwarding|PermitTunnel)" /etc/ssh/sshd_config
# Verify GSSAPIStrictAcceptorCheck setting
grep "GSSAPIStrictAcceptorCheck" /etc/ssh/sshd_config
# Audit authorized_keys principal restrictions
grep "principals=" ~/.ssh/authorized_keys

Immediate Mitigation Steps

Apply Ubuntu security patches via package manager

For Ubuntu 14.04 LTS, 18.04 LTS, and 20.04 LTS:

# Update package lists
sudo apt update
# Install OpenSSH security updates
sudo apt install --only-upgrade openssh-client openssh-server openssh-sftp-server
# Verify installation
ssh -V

Verification: Confirm the installed version includes USN-8804-1 patches by checking the package changelog:

apt changelog openssh-server | head -20

Review sshd_config for risky setting combinations

# Backup current configuration
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.backup
# Check for DisableForwarding and PermitTunnel conflict
sudo grep -E "^(DisableForwarding|PermitTunnel)" /etc/ssh/sshd_config

Recommended configuration:

# If forwarding must be disabled, use only DisableForwarding
DisableForwarding yes
# Do NOT use PermitTunnel with DisableForwarding
# If tunneling is required, explicitly allow it
PermitTunnel yes
# Do NOT use DisableForwarding with PermitTunnel

Audit authorized_keys principal restrictions

# Review all authorized_keys files for principal restrictions
sudo find /home -name "authorized_keys" -exec grep -l "principals=" {} \;
# Verify principal values are intentional
sudo grep "principals=" /home/*/.ssh/authorized_keys

Best Practice: Use principal restrictions to limit key usage to specific purposes:

# Example: Restrict key to administrative operations only
principals="admin-only" ssh-rsa AAAA...
# Example: Restrict key to specific commands
restrict,command="rsync --server" ssh-rsa AAAA...

Restrict untrusted SFTP server connections

Mitigation for CVE-2026-59995:

# Avoid connecting to untrusted SFTP servers
# If necessary, use sftp with explicit path restrictions
# Use absolute paths for downloads
sftp user@trusted-server.com
> get /remote/path/file.txt /local/path/file.txt
# Verify downloaded files before use
sha256sum /local/path/file.txt

Configuration-level mitigation:

# In ~/.ssh/config, restrict SFTP to trusted servers only
Host trusted-sftp-server
    HostName sftp.example.com
    User sftp-user
    IdentityFile ~/.ssh/sftp_key

Detailed CVE Breakdown

CVE-2026-35387: ECDSA algorithm restriction bypass

Technical Details: OpenSSH maintains a list of allowed elliptic curve algorithms for ECDSA keys. The validation logic fails to properly enforce these restrictions, allowing clients to use unintended algorithms.

Impact: Attackers can force use of weaker ECDSA variants, potentially enabling cryptographic attacks.

Mitigation:

# Explicitly specify allowed key algorithms in sshd_config
PubkeyAcceptedAlgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521

CVE-2026-59995: SFTP path traversal vulnerability

Technical Details: When downloading files via SFTP, OpenSSH does not validate that the final file path remains within the intended directory. A malicious SFTP server can include path traversal sequences in filenames.

Impact: Files can be written outside the intended directory, potentially overwriting system files or configuration.

Mitigation:

# Use absolute paths and verify downloads
sftp user@server.com
> get /remote/file.txt /tmp/file.txt
# Verify before moving to final location
$ sha256sum /tmp/file.txt
$ mv /tmp/file.txt /final/location/

CVE-2026-59997: internal-sftp argument handling flaw

Technical Details: The internal-sftp subsystem ignores certain security-related command-line arguments, such as chroot restrictions.

Impact: SFTP users may access files outside intended directories despite chroot configuration.

Mitigation:

# In sshd_config, explicitly configure SFTP subsystem
Subsystem sftp /usr/lib/openssh/sftp-server -f AUTHPRIV -l INFO
# Use Match blocks to enforce chroot for SFTP users
Match User sftp-user
    ChrootDirectory /var/sftp
    ForceCommand internal-sftp
    AllowAgentForwarding no
    AllowTcpForwarding no
    PermitTTY no

CVE-2026-59998: Windows Active Directory GSSAPI bypass

Technical Details: When GSSAPIStrictAcceptorCheck is disabled (non-default), OpenSSH fails to properly validate GSSAPI tokens from Windows Active Directory, allowing authentication bypass.

Impact: Attackers can authenticate without valid AD credentials in misconfigured environments.

Mitigation:

# In sshd_config, ensure strict GSSAPI checking
GSSAPIStrictAcceptorCheck yes
# Verify setting is active
sudo sshd -T | grep GSSAPIStrictAcceptorCheck

Configuration Review Checklist

DisableForwarding and PermitTunnel concurrent usage

  • [ ] Verify /etc/ssh/sshd_config does not contain both DisableForwarding yes and PermitTunnel yes
  • [ ] If forwarding must be disabled, use only DisableForwarding yes
  • [ ] If tunneling is required, use only PermitTunnel yes without DisableForwarding
  • [ ] Test configuration: sudo sshd -T | grep -E "^(disable|permit)"

GSSAPIStrictAcceptorCheck settings with Active Directory

  • [ ] Verify GSSAPIStrictAcceptorCheck yes is configured (default)
  • [ ] If using Windows Active Directory, test GSSAPI authentication after patching
  • [ ] Monitor auth logs for GSSAPI failures: grep gssapi /var/log/auth.log
  • [ ] Coordinate with AD administrators if GSSAPI authentication fails

Non-default username parsing configurations

  • [ ] Search for custom username parsing logic in sshd_config
  • [ ] Verify no shell metacharacters are processed in usernames
  • [ ] Test authentication with special characters: ssh 'user$(id)'@localhost
  • [ ] Confirm authentication is rejected or username is properly escaped

Remote forwarding operation limits

  • [ ] Review concurrent remote forwarding limits in sshd_config
  • [ ] Consider implementing connection limits: MaxStartups 10:30:100
  • [ ] Monitor for excessive forwarding operations: netstat -an | grep ESTABLISHED | wc -l
  • [ ] Test concurrent forwarding stability after patching

Frequently Asked Questions

Which Ubuntu LTS versions require immediate patching?

Ubuntu 14.04 LTS, Ubuntu 18.04 LTS, and Ubuntu 20.04 LTS all contain vulnerabilities addressed in USN-8804-1. Each version is affected by different CVE combinations, with Ubuntu 20.04 LTS affected by the most vulnerabilities (5 version-specific CVEs plus additional cross-version flaws).

Can attackers execute arbitrary code through these vulnerabilities?

Yes. CVE-2026-35386 allows remote code execution via crafted usernames in non-default configurations, and CVE-2026-73282 enables code execution through race conditions in concurrent remote forwarding operations. Both require specific conditions but result in arbitrary code execution with SSH daemon privileges.

What is the primary attack vector for unauthorized access?

CVE-2026-35414 allows attackers to bypass principal restrictions in authorized_keys files, while CVE-2026-59998 exploits faulty GSSAPIStrictAcceptorCheck handling with Windows Active Directory environments. Both enable unauthorized authentication without valid credentials.

How can untrusted SFTP servers compromise my system?

CVE-2026-59995 allows malicious SFTP servers to write downloaded files outside the intended directory through path traversal, potentially overwriting critical system files, configuration files, or executables.

What configuration changes increase vulnerability risk?

Using DisableForwarding and PermitTunnel simultaneously (CVE-2026-59999), non-default username parsing, and GSSAPIStrictAcceptorCheck with Active Directory without proper validation all increase risk. Additionally, connecting to untrusted SFTP servers increases exposure to CVE-2026-59995.

How do I detect if my system is being exploited?

Monitor SSH logs for usernames with shell metacharacters, excessive GSSAPI authentication attempts, unusually rapid connection attempts, and check sshd_config for risky setting combinations. Use the detection commands provided in the “How to Detect Exploitation Attempts” section.

What is the recommended patching timeline?

Apply patches immediately via your Ubuntu package manager. These are critical vulnerabilities affecting core SSH functionality used across enterprise and production environments. Delay increases exposure to active exploitation.

Do all CVEs in USN-8804-1 affect my Ubuntu version?

No. Ubuntu 14.04 LTS is affected by 2 version-specific CVEs, Ubuntu 18.04 LTS by 3 CVEs, and Ubuntu 20.04 LTS by 5 CVEs. Additional CVEs affect all versions. Verify your specific version and apply only relevant patches using the version-specific guidance provided.


References

  • Ubuntu Security Notice: USN-8804-1
  • CVE Identifiers: CVE-2026-35386, CVE-2026-35387, CVE-2026-35414, CVE-2026-59995, CVE-2026-59997, CVE-2026-59998, CVE-2026-59999, CVE-2026-60000, CVE-2026-60001, CVE-2026-73282
  • OpenSSH Documentation: https://man.openbsd.org/sshd_config
  • Ubuntu Security: https://ubuntu.com/security

Last Updated: [Current Date] Advisory Status: Active – Immediate action required

← Back to IT Security