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-111145 Overview
CVE-2026-111145 is a heap out-of-bounds read vulnerability in ytnef through version 2.1.2. The flaw resides in the DecompressRTF() function in lib/ytnef.c, which fails to validate the uncompressedSize field for uncompressed Rich Text Format (RTF) streams. Attackers can craft a malicious winmail.dat Transport Neutral Encapsulation Format (TNEF) attachment containing a hostile PT_BINARY Messaging Application Programming Interface (MAPI) property. Processing the file with ytnefprint or any downstream libytnef caller crashes the process and can leak adjacent heap memory. The weakness is classified as CWE-125 (Out-of-Bounds Read).
Critical Impact
A crafted winmail.dat attachment can crash ytnef-based mail processors and expose adjacent heap memory to the attacker.
Affected Products
- ytnef versions up to and including 2.1.2
- The libytnef library consumed by downstream mail parsers
- The ytnefprint command-line utility
Discovery Timeline
- 2026-10-15 - CVE-2026-111145 published to the National Vulnerability Database (NVD)
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-111145
Vulnerability Analysis
The ytnef project parses TNEF attachments produced by Microsoft Outlook and Exchange, commonly delivered as winmail.dat files. Within lib/ytnef.c, the DecompressRTF() function handles both compressed and uncompressed RTF streams embedded as PT_BINARY MAPI properties. For the uncompressed path, the function trusts the attacker-controlled uncompressedSize header field without comparing it against the actual input buffer length. A read loop then copies bytes based on the declared size, walking past the end of the allocated heap buffer.
Because the read occurs in a library consumed by multiple mail-processing tools, any application linking libytnef inherits the exposure. The impact is limited to information disclosure of adjacent heap memory and process termination rather than code execution. See the Vulncheck advisory and the HackMD analysis for a deeper walkthrough.
Root Cause
The root cause is missing bounds validation in DecompressRTF() at the uncompressed-stream branch. The function reads the uncompressedSize value from the TNEF stream header and uses it directly as a copy length. No comparison is made against the remaining bytes in the source buffer, violating safe parsing of untrusted input. The relevant source resides around lines 1554–1563 of lib/ytnef.c.
Attack Vector
An attacker crafts a winmail.dat TNEF attachment that embeds a PT_BINARY MAPI property containing a malformed uncompressed RTF stream. The stream declares a large uncompressedSize while providing a smaller actual payload. When a victim opens the attachment with ytnefprint, or when an automated mail gateway invokes libytnef, the parser performs the oversized read. User interaction is required because the victim must process the attachment locally. See the GitHub issue tracker for reproduction details.
Detection Methods for CVE-2026-111145
Indicators of Compromise
- Unexpected crashes or SIGSEGV terminations of ytnefprint, ytnef, or any custom tool linking libytnef.
- winmail.dat attachments where the embedded RTF stream header advertises an uncompressedSize larger than the stream body.
- AddressSanitizer or Valgrind heap-buffer-overflow (read) reports originating from DecompressRTF().
Detection Strategies
- Scan mail-gateway logs for repeated TNEF parsing failures tied to the same sender or attachment hash.
- Fuzz libytnef consumers with instrumented builds to surface oversized uncompressedSize values before deployment.
- Alert on process exits with non-zero status from any service that invokes ytnefprint as part of attachment handling.
Monitoring Recommendations
- Monitor host telemetry for winmail.dat files written to mail-processing spool directories followed by crashes of parser processes.
- Enable core-dump collection on mail hosts to capture evidence of out-of-bounds reads for forensic review.
- Track outbound memory-pattern signatures from mail processors that could indicate leaked heap bytes being exfiltrated.
How to Mitigate CVE-2026-111145
Immediate Actions Required
- Upgrade ytnef and libytnef as soon as a fixed release becomes available on the Yeraze/ytnef repository.
- Restrict execution of ytnefprint and dependent tools to sandboxed, non-privileged accounts.
- Block or quarantine winmail.dat attachments at the mail gateway for environments that do not require TNEF decoding.
Patch Information
As of the NVD publication date, no fixed release is listed for ytnef 2.1.2. Track the GitHub issue #112 and the project repository for an upstream patch and the next tagged release.
Workarounds
- Disable automated TNEF decoding in mail processing pipelines until a patched libytnef build is deployed.
- Run ytnefprint inside a seccomp or AppArmor profile that constrains memory access and blocks network egress.
- Pre-filter attachments with a hardened parser that rejects RTF streams whose declared uncompressedSize exceeds the remaining buffer length.
# Example mail-gateway rule: quarantine winmail.dat attachments
# Postfix header_checks snippet
/^Content-(Type|Disposition):.*name="?winmail\.dat"?/ HOLD TNEF attachment held pending CVE-2026-111145 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

