CVE-2026-71267

microtar Stack Buffer Overflow in mtar_write_file_header() and mtar_write_dir_header()

Published Aug 5, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
microtar's mtar_write_file_header and mtar_write_dir_header functions (src/microtar.c) copy a caller-supplied entry name into the 100-byte field of a stack-allocated mtar_header_t via strcpy(h.name, name), with no check that strlen(name) is less than 100 before the copy.

Analysis

AI-generated

Technical impact

microtar exposes a stack buffer overflow in mtar_write_file_header() and mtar_write_dir_header() functions in src/microtar.c. These functions copy a caller‑supplied entry name into a 100‑byte field of a stack‑allocated mtar_header_t via strcpy(h.name, name) without ensuring the string length is less than 100. When a name longer than 99 characters is processed, the buffer overflows and corrupts the stack frame, enabling an attacker to overwrite the process context or inject arbitrary code. The vulnerability is classified as CWE‑120 and CWE‑121 and provides a straightforward path for code execution with the privileges of the running process. If the process runs with elevated rights, the impact can extend to privilege escalation.

Affected Systems

The repository rxi:microtar is the vendor and product affected. No version list was supplied, so any release that still contains the original source from GitHub with the unbounded strcpy is vulnerable. Applications that embed microtar and process user‑supplied or attacker‑controlled filenames during archive creation are also impacted.

Risk and Exploitability

With a CVSS score of 9.8 the vulnerability is classified as critical, and the EPSS score is 0.0034 (0.34%), indicating a very low probability of exploitation. Based on the description, it is inferred that the likely attack vector involves controlling the filename argument, which could be achieved either locally when a user creates an archive, or remotely if the archiving functionality is exposed over a network. The lack of bounds checking creates a simple exploitation route on any system running a vulnerable build. A successful exploit would likely grant the attacker arbitrary local code execution; if the process runs with elevated privileges, privilege escalation could follow. The vulnerability is not listed in CISA’s KEV catalog.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Replace microtar with a version that bounds‑checks the filename length or patch the source to enforce a 99‑byte limit.
  • Validate or truncate all filenames before passing them to mtar_write_file_header() or mtar_write_dir_header() to ensure they do not exceed 99 characters.
  • Compile applications that use microtar with stack protection options such as –fstack‑protector and enable address space layout randomization to increase exploitation difficulty.

Generated by OpenCVE AI on August 10, 2026 at 21:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description microtar's mtar_write_file_header() and mtar_write_dir_header() functions (src/microtar.c) copy a caller-supplied entry name into the 100-byte `name` field of a stack-allocated mtar_header_t via strcpy(h.name, name), with no check that strlen(name) is less than 100 before the copy. Any application that calls these functions with an externally-influenced filename longer than 99 characters (e.g. when archiving user-supplied or attacker-controlled filenames) triggers a stack buffer overflow. microtar's mtar_write_file_header and mtar_write_dir_header functions (src/microtar.c) copy a caller-supplied entry name into the 100-byte field of a stack-allocated mtar_header_t via strcpy(h.name, name), with no check that strlen(name) is less than 100 before the copy.
Title microtar - Stack Buffer Overflow in mtar_write_file_header() and mtar_write_dir_header() microtar Stack Buffer Overflow in mtar_write_file_header() and mtar_write_dir_header()
Type Values Removed Values Added
Title microtar Stack Buffer Overflow in mtar_write_file_header() and mtar_write_dir_header() microtar - Stack Buffer Overflow in mtar_write_file_header() and mtar_write_dir_header()
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rxi
Rxi microtar
Vendors & Products Rxi
Rxi microtar
Type Values Removed Values Added
Description microtar's mtar_write_file_header() and mtar_write_dir_header() functions (src/microtar.c) copy a caller-supplied entry name into the 100-byte `name` field of a stack-allocated mtar_header_t via strcpy(h.name, name), with no check that strlen(name) is less than 100 before the copy. Any application that calls these functions with an externally-influenced filename longer than 99 characters (e.g. when archiving user-supplied or attacker-controlled filenames) triggers a stack buffer overflow.
Title microtar Stack Buffer Overflow in mtar_write_file_header() and mtar_write_dir_header()
Weaknesses CWE-121
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

  • CWE-121

    Stack-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
TuranSec
Published
Updated
Aug 10, 2026, 11:46 AM
Reserved
Aug 5, 2026, 12:23 PM
Status
Deferred
Published
Aug 5, 2026, 1:24 PM
Modified
Oct 24, 2026, 3:10 PM
Severity
Important
Public date
Aug 5, 2026, 12:26 PM