CVE-2020-28624

8.8 HIGH

📋 TL;DR

This vulnerability in CGAL library allows remote code execution through specially crafted polygon files. Attackers can exploit out-of-bounds read and type confusion vulnerabilities in Nef polygon parsing to execute arbitrary code. Systems using CGAL for computational geometry operations are affected.

💻 Affected Systems

Products:
  • CGAL (Computational Geometry Algorithms Library)
Versions: CGAL-5.1.1 and earlier versions with Nef polygon functionality
Operating Systems: Linux, Unix-like systems, Windows (if compiled with vulnerable CGAL)
Default Config Vulnerable: ⚠️ Yes
Notes: Only applications using CGAL's Nef polygon parsing functionality are vulnerable. Many CGAL installations may not use this specific feature.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining code execution at the privilege level of the CGAL process, potentially leading to data theft, ransomware deployment, or lateral movement.

🟠

Likely Case

Application crash (denial of service) or limited code execution within the application context, potentially allowing file system access or further exploitation.

🟢

If Mitigated

Application crash with no code execution if memory protections (ASLR, DEP) are effective, but still causing service disruption.

🌐 Internet-Facing: MEDIUM - Requires attacker to supply malicious polygon files to vulnerable applications, which is plausible for web services processing geometry data.
🏢 Internal Only: LOW - Requires local file access or internal network exploitation, less likely unless CGAL is used in internal file processing systems.

🎯 Exploit Status

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

Exploitation requires crafting specific polygon files and understanding CGAL's internal data structures. No public exploit code has been released.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: CGAL-5.1.2 and later

Vendor Advisory: https://www.cgal.org/

Restart Required: Yes

Instructions:

1. Update CGAL to version 5.1.2 or later. 2. Recompile any applications using CGAL. 3. Restart affected services. 4. For Linux distributions, use package manager: 'sudo apt update && sudo apt upgrade libcgal-dev' (Debian/Ubuntu) or 'sudo yum update CGAL' (RHEL/CentOS).

🔧 Temporary Workarounds

Disable Nef polygon parsing

all

Modify applications to avoid using CGAL's Nef polygon functionality if not required

Recompile applications with NEF_2/3 support disabled if possible

Input validation

all

Implement strict validation of polygon files before passing to CGAL

Add file format validation in application code

🧯 If You Can't Patch

  • Network segmentation: Isolate systems using CGAL from untrusted networks
  • Application sandboxing: Run CGAL applications in containers or with reduced privileges

🔍 How to Verify

Check if Vulnerable:

Check CGAL version: 'pkg-config --modversion cgal' or check installed packages for libcgal version

Check Version:

pkg-config --modversion cgal || dpkg -l | grep libcgal || rpm -qa | grep -i cgal

Verify Fix Applied:

Verify CGAL version is 5.1.2 or later and applications have been recompiled

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when processing polygon files
  • Memory access violation errors in application logs
  • Unexpected process termination of CGAL applications

Network Indicators:

  • Unusual file uploads to services processing geometry data
  • Multiple failed polygon file processing attempts

SIEM Query:

Process: (name="*cgal*" OR name="*geometry*") AND EventID: (1000 OR 1001) AND Message: ("access violation" OR "segmentation fault" OR "out of bounds")

🔗 References

📤 Share & Export