Skip to main content

microtar CVE-2026-71267

| EUVDEUVD-2026-53352 CRITICAL
Stack-based Buffer Overflow (CWE-121)
2026-08-05 TuranSec GHSA-3h9h-4m9g-9m4r
9.8
CVSS 3.1 · Vendor: TuranSec
Share

Severity by source

Vendor (TuranSec) PRIMARY
9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
8.1 HIGH

Kept network vector since attacker-controlled names may arrive remotely, but raised to AC:H because exploitation depends on a reachable call site and defeating stack protections; full C/I/A impact reflects potential code execution.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
CRITICAL
qualitative
Red Hat
8.8 HIGH
qualitative

Primary rating from Vendor (TuranSec).

CVSS VectorVendor: TuranSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Aug 05, 2026 - 13:36 vuln.today
CVE Published
Aug 05, 2026 - 12:26 cve.org
CRITICAL 9.8

DescriptionCVE.org

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.

AnalysisAI

Stack buffer overflow in rxi's microtar C library allows memory corruption when an application archives files with attacker-influenced names longer than 99 characters. The mtar_write_file_header() and mtar_write_dir_header() functions use an unbounded strcpy() into a fixed 100-byte stack buffer, so any calling program that feeds externally-controlled filenames into these APIs is exposed to potential code execution or crash. No public exploit identified at time of analysis, and the library is not listed in CISA KEV, but the missing length check is trivially reachable in code that tars user-supplied paths.

Technical ContextAI

microtar is a minimal single-file tar archive library written in C (src/microtar.c) by developer rxi, commonly embedded in other projects for reading and writing tar streams. The mtar_header_t structure defines a fixed 100-byte name field mirroring the POSIX/ustar tar header name field. The vulnerable code path performs strcpy(h.name, name) with no prior strlen() bounds check, so a name of 100 or more bytes overruns the stack-allocated header structure. This is a textbook CWE-121 (Stack-based Buffer Overflow) caused by use of an unbounded string copy on a caller-supplied input, a root-cause class that classic tar tooling avoids by truncating or splitting long names into the prefix field.

RemediationAI

No vendor-released patch identified at time of analysis; the only references are the upstream repository (https://github.com/rxi/microtar) and source file, with no tagged fixed release. As an immediate code-level fix, integrators should patch mtar_write_file_header() and mtar_write_dir_header() to reject or truncate names where strlen(name) >= 100 (for example replace strcpy with a bounded copy such as snprintf(h.name, sizeof(h.name), "%s", name) or an explicit length guard that returns an error like MTAR_EWRITEFAIL). Until an upstream fix is available, callers should validate and cap filename length to 99 bytes before passing values into these functions, and sanitize any user- or network-sourced paths at the application boundary; the trade-off is that legitimately long names will be rejected or truncated, so archive fidelity for such entries is lost. Compiling the embedding application with stack canaries (-fstack-protector-strong), FORTIFY_SOURCE, ASLR, and non-executable stacks reduces the chance a triggered overflow becomes code execution rather than a crash.

Vendor StatusVendor

SUSE

Severity: Critical

Share

CVE-2026-71267 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy