Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Tar Bomb
Cyber Security

Tar Bomb

← Back to Glossary
By NHI Mgmt Group Updated November 16, 2026 Domain: Cyber Security

A tar bomb is a tar archive that expands into a huge or deeply nested directory tree when extracted. It is usually used to consume disk space, overwhelm file extraction tools, or hide files in excessive path depth. Careful archive inspection and path limits help reduce the risk.

What a tar bomb is and why it matters

A tar bomb is not just a large archive, it is an extraction-time payload. The archive can expand into a very large directory tree, consume disk space, and stress extraction tools by creating extreme path depth or file counts. That makes the issue a mix of storage pressure, parser stress, and safe-handling discipline.

How tar bombs affect extraction workflows

The danger is usually not the archive format itself, but the assumptions made by the tool or operator unpacking it. A tar bomb can hide useful files deep in the tree, scatter paths across many nested directories, or create a flood of entries that slow down scanners and automated unpacking jobs. In practice, that means even a routine file ingest workflow can turn into an availability problem if extraction is done blindly.

Because the effect happens during decompression or extraction, the safest mental model is to treat the archive as untrusted input. Inspection before extraction, path depth checks, and extraction into a constrained workspace all reduce the chance of a surprise directory explosion.

Why tar bombs create operational and security risk

The main risk is denial of service against a workstation, build agent, mail gateway, sandbox, or content pipeline. A tar bomb can fill disk, exhaust inode capacity, trigger quota limits, or make subsequent file operations fail because the extracted tree is too large to manage cleanly. It can also obscure malicious or unwanted files among thousands of harmless entries, which increases the chance of missed review.

When archive handling is part of a broader intake process, the failure mode is often cumulative: one bad extraction can block later jobs, reduce monitoring visibility, or force manual cleanup. The risk is especially relevant where archives arrive from external parties or are automatically processed at scale.

Safe handling and inspection practices

Good handling starts before extraction. Review archive contents, check for unusual nesting, and use tools or flags that limit where files may be written. Extract into an isolated directory with enough space to absorb growth, and enforce path validation so entries cannot spill outside the intended location.

For automated systems, add size, depth, and file-count guardrails to the workflow. If an archive looks suspicious, prefer a staged inspection step over direct unpacking into a working directory. This is the difference between a recoverable review event and a self-inflicted outage.

Detection, cleanup, and recovery after extraction

If a tar bomb has already been extracted, response is mostly containment and recovery. Identify the extraction root, stop any process still expanding or indexing the archive, and measure the impact on disk, inode, and downstream jobs. Then remove the generated tree carefully so cleanup does not worsen the problem.

Post-incident review should ask whether the archive was accepted without inspection, whether sandboxing or quotas were missing, and whether any automation treated the file as trusted. That review matters because the same pattern can recur in build pipelines, file transfer systems, and support tooling if the intake controls do not change.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8, NIST CSF 2.0 and OWASP ASVS set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-10 — Data RecoveryTar bombs can exhaust disk and disrupt availability, so recovery readiness matters.
Recommendation — Validate recovery capacity and restoration procedures for archive-induced storage exhaustion.
NIST CSF 2.0PR.DS-01 — Data-at-rest is protectedArchive extraction can rapidly consume storage and threaten data availability.
DE.CM-01 — Networks and network services are monitored to detect potential cybersecurity eventsSuspicious extraction activity and storage spikes are detectable operational signals.
Recommendation — Limit archive expansion impact by enforcing storage protections and capacity controls. Monitor extraction workflows for unusual file growth and resource exhaustion.
ISO/IEC 27001:2022A.8.8 — Management of technical vulnerabilitiesUnsafe archive handling is a technical weakness that requires controlled remediation.
Recommendation — Treat archive extraction weaknesses as managed technical vulnerabilities in intake workflows.
OWASP ASVSV5 — File HandlingTar bombs are a file-handling hazard involving untrusted archive extraction.
Recommendation — Apply strict file-handling checks before expanding untrusted archives.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 16, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org