CVE-2020-35631

8.8 HIGH

📋 TL;DR

CVE-2020-35631 is a critical vulnerability in CGAL library's Nef polygon-parsing functionality that allows remote code execution through specially crafted files. Attackers can exploit out-of-bounds read and type confusion vulnerabilities to potentially execute arbitrary code on affected systems. This affects any application using vulnerable versions of CGAL to process polygon data from untrusted sources.

💻 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
Default Config Vulnerable: ⚠️ Yes
Notes: Applications must use CGAL's Nef polygon-parsing functionality to be vulnerable. Common in CAD, GIS, and computational geometry applications.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote attacker gains full control of affected system through arbitrary code execution, potentially leading to data theft, ransomware deployment, or system compromise.

🟠

Likely Case

Application crash or denial of service when processing malicious polygon files, with potential for limited code execution in specific configurations.

🟢

If Mitigated

Denial of service or application instability if input validation blocks exploitation attempts.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires crafting malicious polygon files. Talos Intelligence published detailed vulnerability report TALOS-2020-1225 with technical analysis.

🛠️ 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 applications using CGAL. 3. Restart affected services. 4. For Linux distributions, use package manager: 'apt update && apt upgrade libcgal-dev' or 'yum update CGAL'.

🔧 Temporary Workarounds

Input Validation

all

Implement strict validation of polygon files before processing with CGAL

Sandbox Processing

linux

Process untrusted polygon files in isolated containers or sandboxes

🧯 If You Can't Patch

  • Implement network segmentation to isolate systems using CGAL
  • Deploy application allowlisting to prevent unauthorized code execution

🔍 How to Verify

Check if Vulnerable:

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

Check Version:

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

Verify Fix Applied:

Verify CGAL version is 5.1.2 or later: 'pkg-config --modversion cgal' should return 5.1.2+

📡 Detection & Monitoring

Log Indicators:

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

Network Indicators:

  • Unusual file uploads to applications processing polygon data
  • Outbound connections from CGAL applications to unknown destinations

SIEM Query:

source="application_logs" AND ("segmentation fault" OR "access violation" OR "out of bounds") AND process="*cgal*"

🔗 References

📤 Share & Export