CVE-2023-25193
📋 TL;DR
This vulnerability in HarfBuzz text shaping engine allows attackers to cause denial of service through algorithmic complexity attacks. By providing specially crafted text with consecutive marks, attackers can trigger O(n^2) processing time, potentially causing applications to hang or crash. Any system using vulnerable HarfBuzz versions for text rendering is affected.
💻 Affected Systems
- HarfBuzz
- Applications using HarfBuzz library (Chrome, Firefox, LibreOffice, etc.)
📦 What is this software?
Fedora by Fedoraproject
Harfbuzz by Harfbuzz Project
⚠️ Risk & Real-World Impact
Worst Case
Complete denial of service causing application crashes, system instability, or service unavailability in applications that process untrusted text input.
Likely Case
Degraded performance or temporary unresponsiveness in applications processing malicious text, particularly in web browsers, document viewers, or text processing tools.
If Mitigated
Minimal impact with proper input validation and resource limits in place, though performance degradation may still occur.
🎯 Exploit Status
Exploitation requires providing specially crafted text to applications using HarfBuzz, but no public proof-of-concept has been released.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: HarfBuzz 6.0.1 and later
Vendor Advisory: https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc
Restart Required: Yes
Instructions:
1. Update HarfBuzz to version 6.0.1 or later. 2. Update dependent applications (browsers, office suites) to versions using patched HarfBuzz. 3. Restart affected applications/services.
🔧 Temporary Workarounds
Input validation and sanitization
allImplement input validation to reject or sanitize text with excessive consecutive marks before processing with HarfBuzz.
Resource limiting
linuxConfigure resource limits (CPU time, memory) for applications using HarfBuzz to prevent complete denial of service.
ulimit -t 30 # Limit CPU time to 30 seconds (Linux)
Set-ProcessMitigation -Name processname -Enable ProcessTermination (Windows)
🧯 If You Can't Patch
- Implement strict input validation for text processing to reject suspicious patterns
- Deploy monitoring for abnormal resource consumption in text processing applications
🔍 How to Verify
Check if Vulnerable:
Check HarfBuzz version: harfbuzz-config --version or check package version in system package manager.
Check Version:
harfbuzz-config --version || pkg-config --modversion harfbuzz || dpkg -l | grep harfbuzz || rpm -q harfbuzz
Verify Fix Applied:
Verify HarfBuzz version is 6.0.1 or later, or check that dependent applications have been updated to versions using patched HarfBuzz.
📡 Detection & Monitoring
Log Indicators:
- High CPU usage spikes in text processing applications
- Application crashes or hangs during text rendering
- Abnormally long processing times for text operations
Network Indicators:
- Unusually large text payloads being submitted to web applications
- Repeated text submissions with similar patterns
SIEM Query:
process.name:"application_using_harfbuzz" AND (cpu.usage > 90 OR event.action:"crash")
🔗 References
- https://chromium.googlesource.com/chromium/src/+/e1f324aa681af54101c1f2d173d92adb80e37088/DEPS#361
- https://github.com/harfbuzz/harfbuzz/blob/2822b589bc837fae6f66233e2cf2eef0f6ce8470/src/hb-ot-layout-gsubgpos.hh
- https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KWCHWSICWVZSAXP2YAXM65JC2GR53547/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YZ5M2GSAIHFPLHYJXUPQ2QDJCLWXUGO3/
- https://security.netapp.com/advisory/ntap-20230725-0006/
- https://chromium.googlesource.com/chromium/src/+/e1f324aa681af54101c1f2d173d92adb80e37088/DEPS#361
- https://github.com/harfbuzz/harfbuzz/blob/2822b589bc837fae6f66233e2cf2eef0f6ce8470/src/hb-ot-layout-gsubgpos.hh
- https://github.com/harfbuzz/harfbuzz/commit/85be877925ddbf34f74a1229f3ca1716bb6170dc
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KWCHWSICWVZSAXP2YAXM65JC2GR53547/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YZ5M2GSAIHFPLHYJXUPQ2QDJCLWXUGO3/
- https://security.netapp.com/advisory/ntap-20230725-0006/