Skip to main content
Vulnerability Database/CVE-2026-113680

CVE-2026-113680: HarfBuzz NULL Pointer Dereference Vulnerability

CVE-2026-113680 is a NULL pointer dereference flaw in HarfBuzz versions 8.0.0 through 14.6.0 affecting WebAssembly shaper functionality. Attackers can crash applications using crafted fonts. This article covers technical details, affected versions, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-113680 Overview

CVE-2026-113680 is a NULL pointer dereference vulnerability [CWE-476] in HarfBuzz, the widely deployed text shaping engine used across Linux desktops, browsers, and font rendering pipelines. The flaw affects the experimental WebAssembly (wasm) shaper and its host-side imports buffer_set_contents, face_create, and font_set_coords. Versions 8.0.0 through 14.6.0 pass guest-supplied pointers to host functions without validating that the referenced memory regions fall within the wasm module's linear memory. A crafted font containing a malicious embedded wasm module can trigger the dereference and crash any application that attempts to shape text with the font.

Critical Impact

Processing a malicious font crashes any process that uses the HarfBuzz wasm shaper, producing a denial-of-service condition in text rendering clients.

Affected Products

  • HarfBuzz 8.0.0 through 14.6.0 (builds with experimental WebAssembly shaper enabled)
  • Applications and libraries that embed HarfBuzz with wasm shaping support
  • Downstream rendering stacks and font pipelines that process untrusted fonts

Discovery Timeline

  • 2026-10-20 - CVE-2026-113680 published to the National Vulnerability Database
  • 2026-10-21 - Last updated in the NVD database

Technical Details for CVE-2026-113680

Vulnerability Analysis

HarfBuzz supports an experimental WebAssembly shaper that lets fonts embed a wasm module to drive the shaping process. The wasm module runs in a sandboxed linear memory and interacts with HarfBuzz through host-import functions. Three of those host imports, buffer_set_contents in src/hb-wasm-api-buffer.hh, face_create in src/hb-wasm-api-face.hh, and font_set_coords in src/hb-wasm-api-font.hh, accepted guest-provided addresses and lengths without confirming the target region was within the sandbox.

When the guest supplied an out-of-range address with a non-zero length, the host-side translation routines returned a null native pointer. The code then dereferenced that pointer during buffer resize, blob construction, or coordinate assignment. The resulting crash terminates the shaping process. Because text shaping is often invoked by graphical shells, browsers, and PDF renderers, the fault propagates into any client that opens the attacker's font.

Root Cause

The host imports called addr_app_to_native and HB_ARRAY_APP2NATIVE on guest pointers but did not check the result before use. When validate_app_addr rejected the range, the code returned nullptr and continued, allocating buffers or constructing blobs around an invalid base pointer. The fix in commit a71aa86 reorders operations so pointer validation happens before any destructive state change.

Attack Vector

Exploitation requires an attacker to deliver a crafted font file and have a victim open or render it. The CVSS 4.0 vector lists local attack vector with passive user interaction, consistent with font files loaded by document viewers, browsers, or installation flows. No authentication is required, and the impact is limited to availability of the shaping process.

text
// Patch excerpt from src/hb-wasm-api-buffer.hh (buffer_set_contents)
   if (unlikely (hb_unsigned_mul_overflows (length, sizeof (buffer->info[0]), &bytes)))
     return false;
 
-  if (unlikely (!buffer->resize (length)))
-    return false;
-
   glyph_info_t *info = (glyph_info_t *) (validate_app_addr (contents->info, bytes) ? addr_app_to_native (contents->info) : nullptr);
   glyph_position_t *pos = (glyph_position_t *) (validate_app_addr (contents->pos, bytes) ? addr_app_to_native (contents->pos) : nullptr);
+  if (unlikely (!info || !pos))
+    return false;
+
+  if (unlikely (!buffer->resize (length)))
+    return false;
 
   if (!buffer->have_positions)
     buffer->clear_positions (); /* This is wasteful. */

Source: GitHub Commit a71aa86

The patch moves the info/pos null checks ahead of buffer->resize, aborting the host function before any invalid pointer is dereferenced. A parallel change in src/hb-wasm-api-face.hh validates the translated data pointer before passing it to hb_blob_create.

Detection Methods for CVE-2026-113680

Indicators of Compromise

  • Repeated crashes in processes that link HarfBuzz, such as browsers, office suites, PDF viewers, or desktop shells, immediately after loading a font.
  • Core dumps or crash reports referencing hb_wasm_shape, buffer_set_contents, face_create, or font_set_coords.
  • Font files containing a non-empty wasm table or custom Wasm OpenType entry delivered from untrusted sources.

Detection Strategies

  • Inventory installed HarfBuzz builds and flag versions 8.0.0 through 14.6.0 compiled with HB_EXPERIMENTAL_API and wasm shaper support.
  • Hunt for recently added font files on endpoints and servers that render documents or web content, prioritizing files with embedded wasm payloads.
  • Correlate application crash telemetry with font load events to surface targeted denial-of-service attempts.

Monitoring Recommendations

  • Collect crash telemetry from text rendering and document processing applications and route it to a central SIEM for correlation.
  • Monitor font directories (/usr/share/fonts, user font folders, application resource paths) for unexpected additions.
  • Track outbound delivery of fonts through email, chat, and document platforms as part of content inspection policies.

How to Mitigate CVE-2026-113680

Immediate Actions Required

  • Upgrade HarfBuzz to a release that includes commit a71aa86 once published by distribution maintainers.
  • If upgrading is not immediately possible, rebuild HarfBuzz without the experimental WebAssembly shaper to remove the vulnerable code path.
  • Restrict ingestion of fonts from untrusted sources in document viewers, mail gateways, and web content filters.

Patch Information

The fix landed upstream in GitHub Pull Request #6414 and commit a71aa86. The patch adds explicit null checks on pointers returned from validate_app_addr and HB_ARRAY_APP2NATIVE before the host functions mutate buffer state or call hb_blob_create. See the VulnCheck Harfbuzz Advisory for distribution tracking.

Workarounds

  • Disable the experimental WebAssembly shaper at build time by omitting HB_EXPERIMENTAL_API and the wasm feature flag.
  • Block or sanitize OpenType fonts containing wasm tables at the mail gateway, web proxy, or document ingestion layer.
  • Sandbox text shaping components so that a crash in a font renderer does not take down the parent application or service.
bash
# Rebuild HarfBuzz without the experimental wasm shaper
meson setup build \
  -Dexperimental_api=false \
  -Dwasm=disabled
ninja -C build
ninja -C build install

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.