Repository navigation
v2.1.3
Security release
ytnef 2.1.3 fixes memory-safety bugs in RTF and MAPI property parsing that a crafted TNEF (winmail.dat) attachment can trigger. Upgrade recommended.
- GHSA-jhg4-xcxm-cfg6: heap buffer overflow (write) and heap out-of-bounds read in
DecompressRTF(), plus a NULL pointer dereference on a partly parsed property. - CVE-2026-111145 and CVE-2026-111146 (#112): heap out-of-bounds reads in
DecompressRTF()andMAPIPrint().
Impact
ytnef's own tools reach these bugs on two paths:
ytnefprintreachesDecompressRTF()viaMAPIPrint().ytnef +F, as run by theytnefprocessprocmail hook on every incomingwinmail.dat, reaches the overflow write and the MELA over-read viaSaveVCalendar()on appointment and meeting-request messages. No user action is needed.
Any other software that parses untrusted TNEF with libytnef 2.1.2 or older is also affected.
Changes
DecompressRTF(): fix the overflow check, bound reads by the property size, refuse properties with no dataIsCompressedRTF(): refuse properties with no dataTNEFFillMapi(): set a value's size only after its data; NUL-terminate string and binary valuesto_utf8: zero the buffer and check the allocationytnef: terminate the StickyNote RTF file name, free the body- New
make checktest:test-data/test_decompress_rtf
Credit
Reported, with patches, by Deepak Jain, AiNET.
Independently reported by Jan Twrsnik.
Full Changelog: v2.1.2...v2.1.3
Authored by Merlin 🪄