CVE-2020-35635
📋 TL;DR
This vulnerability allows remote code execution through an out-of-bounds read and type confusion in CGAL's Nef polygon-parsing functionality. Attackers can exploit it by providing specially crafted malformed files to applications using the vulnerable library. Any system running applications that use CGAL libcgal to parse polygon files is potentially affected.
💻 Affected Systems
- CGAL (Computational Geometry Algorithms Library)
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Full remote code execution with the privileges of the application using CGAL, potentially leading to complete system compromise.
Likely Case
Application crash (denial of service) or limited information disclosure through memory reads.
If Mitigated
No impact if the vulnerable library is not used or if input validation prevents malicious files.
🎯 Exploit Status
Exploitation requires crafting a specific malformed polygon file and getting it processed by a vulnerable application. The Talos report provides technical details.
🛠️ 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 with the updated library. 3. Restart affected services or applications.
🔧 Temporary Workarounds
Input validation and sanitization
allImplement strict validation of polygon files before processing with CGAL
Disable Nef polygon parsing
allIf not required, disable or remove functionality that uses CGAL's Nef polygon parsing
🧯 If You Can't Patch
- Isolate systems using CGAL from untrusted networks and users
- Implement application allowlisting to prevent execution of untrusted polygon processing applications
🔍 How to Verify
Check if Vulnerable:
Check if applications use CGAL and examine version: ldd /path/to/application | grep -i cgal, or check package manager for installed CGAL version
Check Version:
For source installations: check CGAL version in source code or configuration files
Verify Fix Applied:
Verify CGAL version is 5.1.2 or later: dpkg -l libcgal* (Debian/Ubuntu) or rpm -qa | grep -i cgal (RHEL/Fedora)
📡 Detection & Monitoring
Log Indicators:
- Application crashes with segmentation faults when processing polygon files
- Unexpected memory access errors in CGAL-related processes
Network Indicators:
- Unusual file transfers of polygon files to vulnerable systems
SIEM Query:
Process: (name contains 'cgal' OR command_line contains 'cgal') AND (event_type = 'crash' OR exit_code = '139')
🔗 References
- https://lists.debian.org/debian-lts-announce/2022/12/msg00011.html
- https://security.gentoo.org/glsa/202305-34
- https://talosintelligence.com/vulnerability_reports/TALOS-2020-1225
- https://lists.debian.org/debian-lts-announce/2022/12/msg00011.html
- https://security.gentoo.org/glsa/202305-34
- https://talosintelligence.com/vulnerability_reports/TALOS-2020-1225