CVE-2025-31163

6.6 MEDIUM

📋 TL;DR

A segmentation fault vulnerability in fig2dev version 3.2.9a allows attackers to cause denial of service through local input manipulation via the put_patternarc function. This affects systems running vulnerable versions of fig2dev, particularly those processing untrusted FIG files. The vulnerability is triggered through local input manipulation.

💻 Affected Systems

Products:
  • fig2dev
Versions: Version 3.2.9a
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where fig2dev is installed and processes untrusted FIG files.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete denial of service causing fig2dev to crash, potentially disrupting workflows that rely on FIG file conversion.

🟠

Likely Case

Application crash when processing malicious FIG files, requiring manual restart of affected processes.

🟢

If Mitigated

Minimal impact with proper input validation and sandboxing of fig2dev processes.

🌐 Internet-Facing: LOW - Requires local input manipulation and fig2dev execution.
🏢 Internal Only: MEDIUM - Internal users with access to run fig2dev on malicious files could cause service disruption.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires local access to create/manipulate FIG files and execute fig2dev.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check upstream repository for patched version

Vendor Advisory: https://sourceforge.net/p/mcj/tickets/186/

Restart Required: No

Instructions:

1. Check current fig2dev version with 'fig2dev -v'
2. Update through package manager: 'sudo apt update && sudo apt upgrade fig2dev' (Debian/Ubuntu)
3. For source installs: download latest version from upstream repository and recompile

🔧 Temporary Workarounds

Restrict file processing

linux

Limit fig2dev to process only trusted FIG files from known sources

chmod 750 /usr/bin/fig2dev
setfacl -m u:trusteduser:rx /usr/bin/fig2dev

Input validation wrapper

linux

Create a wrapper script that validates FIG files before passing to fig2dev

#!/bin/bash
# Validate FIG file before processing
if [[ "$1" =~ \.fig$ ]] && file "$1" | grep -q "FIG"; then
    /usr/bin/fig2dev "$@"
else
    echo "Invalid or suspicious FIG file"
    exit 1
fi

🧯 If You Can't Patch

  • Remove fig2dev from systems where it's not essential
  • Run fig2dev in a containerized/sandboxed environment with resource limits

🔍 How to Verify

Check if Vulnerable:

Check fig2dev version: 'fig2dev -v' and verify if it's 3.2.9a

Check Version:

fig2dev -v 2>&1 | head -1

Verify Fix Applied:

After update, confirm version changed from 3.2.9a and test with known safe FIG files

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault errors in system logs
  • fig2dev process crashes
  • Core dumps in /var/crash/

Network Indicators:

  • None - local vulnerability only

SIEM Query:

process.name:"fig2dev" AND event.action:"segmentation_fault" OR event.action:"crash"

🔗 References

📤 Share & Export