CVE-2021-41794

7.5 HIGH

📋 TL;DR

This vulnerability in Open5GS allows remote attackers to execute arbitrary code or cause denial of service via a buffer overflow. Attackers can exploit it by sending a specially crafted PFCP Session Establishment Request with 'internet' as the PDI Network Instance. Systems running vulnerable versions of Open5GS UPF (User Plane Function) are affected.

💻 Affected Systems

Products:
  • Open5GS
Versions: 1.0.0 through 2.3.3
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Specifically affects the UPF (User Plane Function) component when processing PFCP Session Establishment Requests.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data exfiltration, or lateral movement within the network.

🟠

Likely Case

Denial of service causing UPF functionality disruption, potentially affecting mobile network services.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls prevent exploitation attempts.

🌐 Internet-Facing: HIGH - The vulnerability can be exploited remotely via network requests to the PFCP interface.
🏢 Internal Only: HIGH - Even internally, any system with network access to the UPF could exploit this vulnerability.

🎯 Exploit Status

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

The vulnerability requires sending a malformed PFCP packet but doesn't require authentication. Public technical details and proof-of-concept information are available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.3.4 and later

Vendor Advisory: https://github.com/open5gs/open5gs/security/advisories/GHSA-5q4x-4q2h-5q4x

Restart Required: Yes

Instructions:

1. Update Open5GS to version 2.3.4 or later. 2. Stop the UPF service. 3. Apply the update. 4. Restart the UPF service. 5. Verify the service is running correctly.

🔧 Temporary Workarounds

Network Access Control

linux

Restrict network access to the PFCP interface (port 8805 by default) to only trusted systems.

iptables -A INPUT -p udp --dport 8805 -s trusted_ip_range -j ACCEPT
iptables -A INPUT -p udp --dport 8805 -j DROP

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate the UPF from untrusted networks
  • Deploy intrusion detection/prevention systems to monitor for exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check Open5GS version: open5gs-upfd --version. If version is between 1.0.0 and 2.3.3 inclusive, the system is vulnerable.

Check Version:

open5gs-upfd --version

Verify Fix Applied:

After patching, verify version is 2.3.4 or later and test PFCP session establishment functionality.

📡 Detection & Monitoring

Log Indicators:

  • PFCP Session Establishment Request failures
  • UPF process crashes or abnormal terminations
  • Memory access violation errors in system logs

Network Indicators:

  • PFCP packets with 'internet' as PDI Network Instance
  • Unusual traffic patterns to port 8805
  • Malformed PFCP packets exceeding normal size limits

SIEM Query:

source="open5gs.logs" AND ("PFCP Session Establishment" OR "internet" OR "buffer overflow")

🔗 References

📤 Share & Export