CVE-2020-18032

7.8 HIGH

📋 TL;DR

This CVE describes a buffer overflow vulnerability in Graphviz graph visualization tools that allows remote attackers to execute arbitrary code or cause denial of service by loading a specially crafted file. The vulnerability affects Graphviz from commit f8b9e035 and earlier versions. Users who process untrusted graph files with vulnerable Graphviz installations are at risk.

💻 Affected Systems

Products:
  • Graphviz
Versions: All versions up to and including commit f8b9e035
Operating Systems: Linux, Windows, macOS, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability is in the lib/common/shapes.c component and triggers when loading crafted files. All Graphviz tools that use this component are affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the Graphviz process, potentially leading to full system compromise if Graphviz runs with elevated privileges.

🟠

Likely Case

Application crash (denial of service) when processing malicious graph files, disrupting graph visualization workflows.

🟢

If Mitigated

Limited impact if Graphviz runs in sandboxed environments with minimal privileges and processes only trusted files.

🌐 Internet-Facing: MEDIUM - Risk exists if Graphviz is exposed via web interfaces that accept user-uploaded graph files, but this is not a common deployment pattern.
🏢 Internal Only: MEDIUM - Internal users could exploit this by providing malicious files to Graphviz processes, particularly in shared environments.

🎯 Exploit Status

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

Exploitation requires the attacker to provide a malicious file that gets processed by Graphviz. The vulnerability is well-documented with public proof-of-concept available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit f8b9e035

Vendor Advisory: https://gitlab.com/graphviz/graphviz/-/issues/1700

Restart Required: No

Instructions:

1. Update Graphviz to version 2.44.1 or later. 2. For Linux systems: Use package manager (apt-get update && apt-get upgrade graphviz, yum update graphviz, etc.). 3. For Windows/macOS: Download latest version from graphviz.org. 4. Recompile from source if using custom builds.

🔧 Temporary Workarounds

Restrict file processing

all

Limit Graphviz to process only trusted files from known sources

Run with reduced privileges

linux

Execute Graphviz with minimal user privileges to limit impact of potential exploitation

sudo -u lowprivuser dot -Tpng input.dot -o output.png

🧯 If You Can't Patch

  • Implement strict input validation for all Graphviz file inputs
  • Deploy Graphviz in containerized or sandboxed environments with no network access

🔍 How to Verify

Check if Vulnerable:

Check Graphviz version: dot -V. If version is 2.44.0 or earlier, or if commit hash includes f8b9e035 or earlier, system is vulnerable.

Check Version:

dot -V 2>&1 | head -1

Verify Fix Applied:

After update, verify version is 2.44.1 or later with: dot -V | grep -q '2\.4[4-9]\|3\.' && echo 'Patched'

📡 Detection & Monitoring

Log Indicators:

  • Graphviz segmentation fault logs
  • Unexpected process termination of dot/neato/fdp tools
  • Memory access violation errors in system logs

Network Indicators:

  • Unusual outbound connections from Graphviz processes
  • File uploads to Graphviz web interfaces followed by crashes

SIEM Query:

process_name:dot AND (event_id:1000 OR signal:SIGSEGV)

🔗 References

📤 Share & Export