CVE-2021-45079

9.1 CRITICAL

📋 TL;DR

This vulnerability in strongSwan allows a malicious VPN responder to bypass authentication by sending an EAP-Success message prematurely. Attackers can establish unauthorized VPN connections without proper client or server authentication. This affects strongSwan IKEv2 implementations using EAP-only authentication with mutual authentication methods.

💻 Affected Systems

Products:
  • strongSwan
Versions: All versions before 5.9.5
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ✅ No
Notes: Only affects configurations using IKEv2 with EAP-only authentication and EAP methods supporting mutual authentication.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete VPN authentication bypass allowing unauthorized network access, potential lateral movement, and data exfiltration.

🟠

Likely Case

Unauthorized VPN access leading to network infiltration and credential harvesting.

🟢

If Mitigated

Limited impact with proper network segmentation and monitoring detecting anomalous VPN connections.

🌐 Internet-Facing: HIGH - VPN gateways exposed to internet are directly vulnerable to remote attackers.
🏢 Internal Only: MEDIUM - Internal VPN servers could be exploited by compromised internal hosts.

🎯 Exploit Status

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

Exploitation requires network access to VPN responder and knowledge of vulnerable configuration.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.9.5 and later

Vendor Advisory: https://www.strongswan.org/blog/2022/01/24/strongswan-vulnerability-(cve-2021-45079).html

Restart Required: Yes

Instructions:

1. Update strongSwan to version 5.9.5 or later. 2. Restart strongSwan services. 3. Verify configuration compatibility with new version.

🔧 Temporary Workarounds

Disable EAP-only authentication

linux

Configure strongSwan to use certificate-based authentication instead of EAP-only authentication.

Modify ipsec.conf to use authby=pubkey instead of EAP-only configurations

Network segmentation

linux

Restrict access to VPN endpoints using firewall rules.

iptables -A INPUT -p udp --dport 500 -s trusted_networks -j ACCEPT
iptables -A INPUT -p udp --dport 500 -j DROP

🧯 If You Can't Patch

  • Implement strict network access controls to limit VPN endpoint exposure
  • Enable detailed VPN connection logging and monitor for authentication anomalies

🔍 How to Verify

Check if Vulnerable:

Check strongSwan version: strongswan --version. If version is below 5.9.5 and using IKEv2 EAP-only authentication, system is vulnerable.

Check Version:

strongswan --version

Verify Fix Applied:

Verify version is 5.9.5 or higher: strongswan --version. Test VPN connections with mutual authentication requirements.

📡 Detection & Monitoring

Log Indicators:

  • EAP-Success messages without preceding proper authentication
  • VPN connections from unexpected sources
  • Authentication sequence anomalies

Network Indicators:

  • IKEv2 handshakes completing unusually quickly
  • VPN traffic from unauthenticated endpoints

SIEM Query:

source="strongswan" AND ("EAP-Success" OR "authentication bypass")

🔗 References

📤 Share & Export