CVE-2024-39223

9.8 CRITICAL

📋 TL;DR

This CVE describes an authentication bypass vulnerability in the SSH service of gost v2.11.5. Attackers can intercept communications by setting the HostKeyCallback function to ssh.InsecureIgnoreHostKey, allowing man-in-the-middle attacks. Anyone using the vulnerable version of gost with SSH enabled is affected.

💻 Affected Systems

Products:
  • gost
Versions: v2.11.5
Operating Systems: All platforms running gost
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where gost SSH service is enabled and configured with vulnerable code.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of SSH communications, allowing attackers to intercept, modify, or inject data in transit, potentially leading to credential theft, data exfiltration, or lateral movement.

🟠

Likely Case

Man-in-the-middle attacks on SSH connections through gost, enabling interception of sensitive data and authentication credentials.

🟢

If Mitigated

Limited impact if proper network segmentation and monitoring are in place, though the vulnerability still exists.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit details are publicly available in GitHub gists and issues, making exploitation straightforward for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v2.11.6 or later

Vendor Advisory: https://github.com/ginuerzh/gost/issues/1034

Restart Required: Yes

Instructions:

1. Check current gost version. 2. Update to v2.11.6 or later via package manager or manual download. 3. Restart gost service. 4. Verify the fix is applied.

🔧 Temporary Workarounds

Disable SSH Service

linux

Temporarily disable the SSH service in gost if not required.

systemctl stop gost-ssh
pkill -f 'gost.*ssh'

Use Alternative Proxy

all

Replace gost SSH functionality with a secure alternative like OpenSSH.

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate gost instances from untrusted networks.
  • Enable comprehensive logging and monitoring for unusual SSH connection patterns or authentication failures.

🔍 How to Verify

Check if Vulnerable:

Check if gost version is v2.11.5 and SSH service is enabled in configuration.

Check Version:

gost -v

Verify Fix Applied:

Verify gost version is v2.11.6 or later and review configuration to ensure HostKeyCallback is not set to ssh.InsecureIgnoreHostKey.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SSH connection attempts
  • Authentication failures or bypasses in gost logs
  • Changes to HostKeyCallback configuration

Network Indicators:

  • Unexpected SSH traffic patterns
  • Man-in-the-middle attack signatures on SSH ports

SIEM Query:

source="gost.log" AND ("ssh.InsecureIgnoreHostKey" OR "authentication bypass")

🔗 References

📤 Share & Export