CVE-2020-28612

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
Operating Systems: Linux, Unix-like systems, Windows
Default Config Vulnerable: ⚠️ Yes
Notes: Applications using CGAL's Nef polygon parsing functionality are vulnerable when processing untrusted input files.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining complete control over the affected system, potentially leading to data theft, ransomware deployment, or lateral movement within the network.

🟠

Likely Case

Application crash leading to denial of service, with potential for limited code execution depending on application context and memory layout.

🟢

If Mitigated

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

🌐 Internet-Facing: MEDIUM - Risk depends on whether affected applications process untrusted polygon files from external sources.
🏢 Internal Only: LOW - Risk is limited unless internal users can supply malicious files to vulnerable applications.

🎯 Exploit Status

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

Exploitation requires crafting specific malformed polygon files and understanding of CGAL's internal data structures.

🛠️ 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.

🔧 Temporary Workarounds

Input validation

all

Validate polygon files before processing with CGAL

Sandbox processing

linux

Process untrusted polygon files in isolated containers

docker run --rm -v /path/to/files:/input cgal-app

🧯 If You Can't Patch

  • Restrict file upload capabilities to trusted sources only
  • Implement strict file type validation for polygon files

🔍 How to Verify

Check if Vulnerable:

Check CGAL version with: dpkg -l libcgal-dev or check installed package version

Check Version:

dpkg -l | grep cgal or cgal_version --version

Verify Fix Applied:

Verify CGAL version is 5.1.2 or higher

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when processing polygon files
  • Memory access violation errors
  • Segmentation faults in CGAL-related processes

Network Indicators:

  • Unexpected file uploads to applications using CGAL
  • Large polygon file transfers

SIEM Query:

process_name:"cgal_app" AND (event_type:crash OR error_message:"segmentation fault")

🔗 References

📤 Share & Export