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

CVE-2026-111146: ytnef Buffer Overflow Vulnerability

CVE-2026-111146 is a heap out-of-bounds read flaw in ytnef that enables attackers to read beyond heap allocations using crafted winmail.dat files. This article covers the technical details, affected versions, and mitigation.

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-111146 Overview

CVE-2026-111146 is a heap out-of-bounds read vulnerability in ytnef through version 2.1.2, a library and utility used to decode TNEF (Transport Neutral Encapsulation Format) winmail.dat attachments produced by Microsoft Outlook. The flaw resides in the MAPIPrint() function in lib/ytnef.c, which processes compressed Rich Text Format (RTF) properties. An attacker who supplies a crafted winmail.dat whose decompressed RTF stream lacks a NUL terminator causes printf to over-read adjacent heap memory. The condition crashes ytnefprint and can leak heap bytes to the output. The vulnerability is tracked as CWE-125 Out-of-Bounds Read.

Critical Impact

Attackers can crash the ytnefprint utility and disclose adjacent heap memory contents by delivering a malicious winmail.dat file to a user or automated processor.

Affected Products

  • ytnef versions through 2.1.2
  • Mail processing pipelines that invoke ytnefprint on untrusted TNEF attachments
  • Downstream Linux distributions packaging ytnef and libytnef

Discovery Timeline

  • 2026-10-15 - CVE-2026-111146 published to the National Vulnerability Database
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-111146

Vulnerability Analysis

The ytnef library parses TNEF-encapsulated MAPI properties, including compressed RTF bodies embedded in winmail.dat attachments. During printing, MAPIPrint() passes the decompressed RTF buffer directly to a formatted output function that expects a C-style NUL-terminated string. When the decompressed payload omits a trailing NUL byte, the printing routine continues reading past the end of the heap allocation until it encounters an unrelated zero byte. The resulting over-read traverses adjacent heap chunks and emits whatever bytes it encounters, which may include pointers, keys, or fragments of other parsed MAPI properties.

The condition requires user interaction, since a victim must invoke ytnefprint or an equivalent consumer on the attacker-supplied file. Exploitation does not require authentication to the host system. See the VulnCheck advisory on ytnef and the HackMD analysis of ytnef for the full write-up.

Root Cause

The root cause is missing length validation and absent NUL termination on the output of the RTF decompression routine. MAPIPrint() treats the decompressed buffer as a null-terminated string and relies on printf-style conversion, but the decompression path does not guarantee this invariant. The referenced source regions at lib/ytnef.c lines 1449-1458 and lines 1605-1614 show the vulnerable formatting calls.

Attack Vector

An attacker crafts a winmail.dat file containing a compressed RTF MAPI property whose decompressed output omits the terminating NUL byte. The attacker delivers the file by email, upload, or any channel that leads to ytnef processing. When a user or automated pipeline runs ytnefprint on the file, the out-of-bounds read fires. Tracking details are available in GitHub Issue #112 on the ytnef repository.

Detection Methods for CVE-2026-111146

Indicators of Compromise

  • winmail.dat attachments that trigger segmentation faults or abnormal termination of ytnefprint
  • Unexpected non-RTF binary content appearing in ytnefprint stdout or log files
  • Core dumps or ASAN heap-buffer-overflow reports originating from MAPIPrint() in lib/ytnef.c

Detection Strategies

  • Scan hosts and mail gateways for installed ytnef or libytnef packages at version 2.1.2 or earlier.
  • Run AddressSanitizer-instrumented builds of ytnef against suspect winmail.dat samples to confirm the out-of-bounds read.
  • Alert on process crashes of ytnefprint in mail-filtering and groupware ingestion pipelines.

Monitoring Recommendations

  • Collect and centralize crash telemetry from mail-processing services that invoke ytnef.
  • Monitor outbound email gateways and MTA logs for TNEF attachments from untrusted senders.
  • Track upstream commits on the ytnef GitHub repository for a security release addressing CVE-2026-111146.

How to Mitigate CVE-2026-111146

Immediate Actions Required

  • Inventory all systems with ytnef installed, including mail gateways, groupware servers, and user workstations.
  • Stop automated invocation of ytnefprint on attachments from untrusted senders until a fix is applied.
  • Isolate ytnef processing in a sandbox or non-privileged service account to limit the impact of memory disclosure.

Patch Information

No fixed release is listed in the enriched data at time of publication. Monitor the ytnef GitHub repository and GitHub Issue #112 for an upstream patch, and update distribution packages as vendors ship backported fixes. Rebuild and redeploy any applications that statically link libytnef.

Workarounds

  • Block or quarantine winmail.dat attachments at the mail gateway when ytnef cannot be upgraded.
  • Run ytnefprint under a seccomp or AppArmor profile that restricts file and network access.
  • Build ytnef with AddressSanitizer in test environments to catch malicious inputs before they reach production.
bash
# Example: quarantine TNEF attachments in Postfix header_checks
/^Content-(Disposition|Type).*name\s*=\s*"?winmail\.dat"?/ HOLD Quarantined pending CVE-2026-111146 review

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.