Executive brief
rxi microtar is a lightweight C library used for reading and writing TAR archive files. A security flaw in how the library handles file names within these archives allows a specially crafted file to crash an application or potentially execute unauthorized code. This occurs when a user or automated system attempts to open or process a malicious TAR archive using the library.
Technical details
A stack-based buffer overflow exists in the raw_to_header() function in src/microtar.c of rxi microtar 0.1.0. The vulnerability is caused by the use of strcpy() to copy the 100-byte 'name' and 'linkname' fields from a TAR header without ensuring the source fields are null-terminated. While the POSIX ustar format allows these fields to be fully populated, microtar fails to account for this, leading to an out-of-bounds read and subsequent stack overflow when processing a crafted archive. Attackers can trigger this via mtar_open(), mtar_read_header(), or mtar_find(). As of the advisory, no official patch is mentioned, though the issue is confirmed via AddressSanitizer.
Affected products
- rxi microtar 0.1.0
Timeline
- 2026-06-17: disclosed: Vulnerability published to NVD