CVE-2026-32288 Overview
A memory exhaustion vulnerability exists in the Go archive/tar package where tar.Reader can allocate an unbounded amount of memory when reading a maliciously-crafted archive. The vulnerability is triggered when processing archives containing a large number of sparse regions encoded in the "old GNU sparse map" format, allowing attackers to cause resource exhaustion and denial of service conditions.
Critical Impact
Applications using Go's archive/tar package to process untrusted tar archives may be vulnerable to denial of service attacks through memory exhaustion.
Affected Products
- Go archive/tar package (versions prior to security patch)
- Applications using tar.Reader to process tar archives with sparse file support
Discovery Timeline
- April 8, 2026 - CVE-2026-32288 published to NVD
- April 8, 2026 - Last updated in NVD database
Technical Details for CVE-2026-32288
Vulnerability Analysis
This vulnerability is classified as a Resource Exhaustion denial of service issue affecting the tar.Reader component in Go's standard library. The root cause lies in how the tar reader handles sparse file metadata when parsing archives using the legacy "old GNU sparse map" format.
When processing tar archives, the tar.Reader must parse sparse file headers that describe non-contiguous data regions within a file. The old GNU sparse map format allows specification of multiple sparse regions, and a maliciously crafted archive can declare an extremely large number of these regions. The reader allocates memory to track each sparse region without implementing proper bounds checking on the total number of entries, leading to unbounded memory allocation.
This vulnerability is particularly concerning for server-side applications that accept and process user-uploaded tar archives, backup systems, container image registries, and CI/CD pipelines that extract archives from untrusted sources.
Root Cause
The vulnerability stems from insufficient validation of the sparse region count in the old GNU sparse map format. When parsing sparse file headers, the tar.Reader allocates memory proportional to the number of sparse entries declared in the archive header without implementing reasonable upper bounds. An attacker can craft an archive that declares millions of sparse regions, causing the reader to attempt massive memory allocations that exhaust available system resources.
Attack Vector
An attacker can exploit this vulnerability by crafting a malicious tar archive with an excessive number of sparse regions in the old GNU sparse map format. When a vulnerable application attempts to read this archive using tar.Reader, the following occurs:
- The tar reader parses the archive header and encounters sparse file metadata
- The old GNU sparse map format is detected, triggering legacy parsing code
- The reader allocates memory structures for each declared sparse region
- Without bounds checking, the allocation continues until memory is exhausted
- The application crashes or becomes unresponsive due to memory exhaustion
The attack requires the ability to supply a malicious tar archive to a target application. This could occur through file upload functionality, archive processing services, or any application that extracts tar files from untrusted sources.
Detection Methods for CVE-2026-32288
Indicators of Compromise
- Unusual memory consumption spikes in applications processing tar archives
- Application crashes or out-of-memory errors during tar extraction operations
- Presence of tar archives with abnormally large sparse file headers
- System resource exhaustion events correlated with archive processing activities
Detection Strategies
- Monitor memory usage patterns of applications that process tar archives for anomalous growth
- Implement logging for tar archive processing operations to identify suspicious files
- Deploy application performance monitoring to detect resource exhaustion attempts
- Review Go application dependencies to identify use of vulnerable archive/tar versions
Monitoring Recommendations
- Configure memory usage alerts for services that handle tar archive processing
- Implement resource limits (cgroups, ulimits) for archive processing workloads
- Monitor system logs for OOM killer events related to Go applications
- Track archive processing metrics including file sizes and processing times
How to Mitigate CVE-2026-32288
Immediate Actions Required
- Update Go to the latest patched version that addresses this vulnerability
- Identify all applications using the archive/tar package that process untrusted archives
- Implement resource limits on archive processing operations as an interim measure
- Consider temporarily disabling processing of tar archives from untrusted sources
Patch Information
The Go team has released a security patch to address this vulnerability. The fix implements proper bounds checking on sparse region allocations in the old GNU sparse map format handler. Review the Go.dev Change Log Entry for the specific code changes and the Go.dev Vulnerability Information for affected version details.
Additional resources:
Workarounds
- Implement memory limits on processes that handle tar archive extraction using OS-level controls
- Add pre-processing validation to check tar archive headers before full extraction
- Consider using containerization or sandboxing for archive processing workloads to limit blast radius
- Implement archive size limits and reject excessively large or suspicious archives before processing
# Example: Setting memory limits for Go applications processing tar archives
# Using systemd resource controls
systemctl set-property myapp.service MemoryMax=512M
# Using ulimit in shell scripts
ulimit -v 524288 # Limit virtual memory to 512MB
./tar-processor
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


