CVE-2021-41990

7.5 HIGH

📋 TL;DR

CVE-2021-41990 is an integer overflow vulnerability in the gmp plugin of strongSwan VPN software. Attackers can trigger this by sending a specially crafted certificate with an RSASSA-PSS signature, potentially causing denial of service. This affects strongSwan installations using the gmp plugin before version 5.9.4.

💻 Affected Systems

Products:
  • strongSwan VPN
Versions: All versions before 5.9.4
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if gmp plugin is enabled and configured. Many deployments use other plugins like openssl by default.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote denial of service causing strongSwan service crash, disrupting VPN connectivity for all users

🟠

Likely Case

Service crash requiring manual restart, temporary VPN outage

🟢

If Mitigated

No impact if gmp plugin is disabled or system is patched

🌐 Internet-Facing: MEDIUM - VPN gateways exposed to internet could be targeted for DoS attacks
🏢 Internal Only: LOW - Requires attacker to have network access to VPN endpoints

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending crafted certificates during VPN handshake. No public exploit code available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.9.4

Vendor Advisory: https://github.com/strongswan/strongswan/releases/tag/5.9.4

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Download strongSwan 5.9.4 or later from official repository. 3. Compile and install following strongSwan documentation. 4. Restart strongSwan services.

🔧 Temporary Workarounds

Disable gmp plugin

linux

Switch to alternative cryptographic plugin like openssl

Edit strongSwan configuration to remove or comment out 'load = gmp'
Change to 'load = openssl' or other supported plugin

🧯 If You Can't Patch

  • Implement network segmentation to restrict access to VPN endpoints
  • Use certificate pinning or strict certificate validation policies

🔍 How to Verify

Check if Vulnerable:

Check strongSwan version and gmp plugin status: 'strongswan --version' and review configuration files for gmp plugin usage

Check Version:

strongswan --version

Verify Fix Applied:

Confirm version is 5.9.4 or later: 'strongswan --version | grep -i strongswan'

📡 Detection & Monitoring

Log Indicators:

  • Unexpected strongSwan service crashes
  • Certificate validation errors in VPN logs
  • Connection failures during handshake

Network Indicators:

  • Unusual certificate sizes or formats in VPN traffic
  • Multiple failed connection attempts with malformed certificates

SIEM Query:

source="strongswan" AND (event="crash" OR event="error" AND message="certificate" AND message="overflow")

🔗 References

📤 Share & Export