CVE-2019-18397

7.8 HIGH

📋 TL;DR

A buffer overflow vulnerability in GNU FriBidi's fribidi_get_par_embedding_levels_ex() function allows attackers to cause denial of service or potentially execute arbitrary code by delivering crafted text content. This affects any application using FriBidi for bidirectional text layout, including GNOME/GTK+ applications using Pango like GEdit and HexChat. Users of affected applications on systems with vulnerable FriBidi versions are at risk.

💻 Affected Systems

Products:
  • GNU FriBidi
  • Pango
  • GNOME applications
  • GTK+ applications
  • GEdit
  • HexChat
  • Any application using FriBidi for bidirectional text
Versions: FriBidi through version 1.0.7
Operating Systems: Linux, Unix-like systems, Any OS running affected applications
Default Config Vulnerable: ⚠️ Yes
Notes: Applications must use FriBidi for bidirectional text processing. Common in GNOME/GTK+ environments with Pango.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the application processing the crafted text, potentially leading to full system compromise.

🟠

Likely Case

Application crash causing denial of service, disrupting user workflows and potentially causing data loss.

🟢

If Mitigated

Limited impact if applications run with minimal privileges and proper sandboxing, though crashes may still occur.

🌐 Internet-Facing: MEDIUM - Requires user interaction (opening/viewing crafted content) but can be triggered via web content, documents, or messages.
🏢 Internal Only: MEDIUM - Similar risk internally if users process untrusted content, though attack surface may be smaller.

🎯 Exploit Status

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

Exploitation requires delivering crafted text to vulnerable applications. Proof of concept exists in commit references and bug reports.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FriBidi 1.0.8 and later

Vendor Advisory: https://access.redhat.com/errata/RHSA-2019:4326

Restart Required: Yes

Instructions:

1. Update FriBidi to version 1.0.8 or later via system package manager. 2. Update dependent applications (Pango, GNOME/GTK+ apps). 3. Restart affected applications or the system.

🔧 Temporary Workarounds

Disable bidirectional text processing

all

Configure applications to disable FriBidi/bidirectional text support if not needed.

Application-specific configuration; no universal command

Use application sandboxing

linux

Run vulnerable applications with reduced privileges using sandboxing tools.

firejail --noprofile gedit
bwrap --unshare-all --dev /dev --ro-bind /usr /usr --ro-bind /etc /etc gedit

🧯 If You Can't Patch

  • Restrict user access to untrusted text sources (files, messages, web content)
  • Monitor application crashes and unusual behavior for potential exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check FriBidi version: fribidi --version or dpkg -l | grep fribidi or rpm -q fribidi

Check Version:

fribidi --version 2>/dev/null || dpkg -l | grep fribidi || rpm -q fribidi || pkg-config --modversion fribidi

Verify Fix Applied:

Confirm FriBidi version is 1.0.8 or later using version check command

📡 Detection & Monitoring

Log Indicators:

  • Application crashes (segmentation faults) in FriBidi/Pango-related processes
  • Unexpected termination of GNOME/GTK+ applications

Network Indicators:

  • Inbound delivery of crafted text files or messages to vulnerable applications

SIEM Query:

Process termination with exit code 11 (SIGSEGV) AND process_name IN ('gedit', 'hexchat', other FriBidi-using apps)

🔗 References

📤 Share & Export