Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Zip Slip
Cyber Security

Zip Slip

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

Zip Slip is a path traversal flaw in archive extraction. It happens when an application writes ZIP entries using attacker controlled names without checking where those paths resolve. A malicious archive can escape the target directory and overwrite files elsewhere on the filesystem, sometimes leading to code execution or service compromise.

What Zip Slip Means in Practice

Zip Slip is not just a bad filename, it is a trust failure in archive handling. The vulnerable application assumes an entry name is safe to write, but attacker-controlled paths can redirect extraction outside the intended folder and turn a routine unpacking step into an arbitrary file write.

This matters because archive extraction often runs in build systems, upload pipelines, desktop tools, backup utilities and server-side import flows. When those paths are not normalised and constrained, a malicious archive can overwrite application files, startup scripts, configuration, or other filesystem targets that the process can reach.

Why Archive Path Traversal Becomes Dangerous

The core danger is that path traversal lets the attacker escape the extraction root while still using an operation that looks legitimate to the application. A simple unzip can become a write primitive, which is why Zip Slip is usually treated as a filesystem integrity issue with possible code execution or service compromise as the downstream outcome.

The impact depends on what the process can write and what the overwritten files do next. Replacing a config file may change application behaviour, replacing a deployed script may enable execution on restart, and replacing files in a shared workspace may affect other jobs or users that trust that location.

For broader defensive guidance on the underlying pattern, see Path Traversal Guide, which covers archive zip slip, safe file APIs and detection patterns.

Where Zip Slip Usually Appears

Zip Slip shows up wherever software accepts archives from users, partners, CI systems or upstream feeds and then extracts them automatically. That includes upload-and-unpack workflows, dependency or plugin installers, mobile apps that unpack content, and build tooling that processes archives as part of a pipeline.

It is also common in code that tries to preserve the original directory structure inside the archive without checking whether the resolved destination still sits under the intended root. Relative traversal sequences, absolute paths and path tricks that survive superficial validation are all part of the same failure class.

If you are hardening upload and extraction workflows together, the File Upload Security Guide is a useful companion reference, because unsafe uploads and unsafe extraction often reinforce each other.

How to Recognise and Limit Exposure

Exposure checks start with inventory: identify every place archives are received, generated, decompressed or repackaged. Then trace whether the extraction step runs on sensitive hosts, whether the process has write access beyond a sandbox, and whether the archive source can be influenced by an external actor.

Defensively, the key requirement is to validate the resolved path, not just the raw filename. Extraction should be constrained to an approved root, and suspicious entry names should be rejected before any file is written. Safe defaults matter most in languages and libraries that make archive handling easy but do not enforce destination safety for you.

For implementation patterns around safe uploads and quarantine before serving content, Secure File Upload Handling Guide provides a practical control-oriented view that pairs well with archive safety.

Risk and Threat Considerations

Zip Slip is dangerous because it converts untrusted archive content into filesystem write access outside the intended directory. That can corrupt application state, tamper with startup or configuration files, and in some deployment models create a route to execution or persistence.

Failure mechanism: The extractor trusts archive entry names, resolves them after extraction begins, or fails to enforce a root directory boundary, allowing traversal sequences to escape the destination path.

Impact: Attackers can overwrite files that influence application behaviour, service availability, or code execution, which can lead to compromise of the affected host or workload.

Standards & Framework Alignment

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

OWASP ASVS, CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP ASVSV5 — File HandlingZip Slip is an archive file handling flaw that requires safe path validation during extraction.
V15 — Secure Coding and ArchitectureSecure design must constrain archive extraction to a safe filesystem boundary.
Recommendation — Validate extracted paths stay under the intended root before writing any file. Design extraction routines so untrusted archives cannot write outside the allowed workspace.
CIS Controls v8CIS-16 — Application Software SecurityZip Slip is a software weakness that should be addressed in secure development and testing.
Recommendation — Review archive-processing code for traversal checks and reject unsafe extraction logic.
NIST SP 800-53 Rev 5SI-10 — Information Input ValidationZip Slip is caused by insufficient validation of attacker-controlled archive entry names.
Recommendation — Validate archive entry paths before extraction and block traversal outside the target directory.

Practitioner Guidance

Why practitioners should care: Zip Slip is a control failure in a common utility path, which means it can sit unnoticed in otherwise well-run systems. The safest approach is to treat archive extraction as a security boundary, not a convenience function.

What to watch for: Any code path that extracts user-controlled archives, preserves directory structure, or runs with elevated filesystem privileges deserves review. Special attention is warranted when the destination is shared, writable by a service account, or used by automation that later executes or loads extracted files.

Practitioner takeaway: If you cannot prove that every extracted entry stays inside the approved root, the extraction logic is not safe enough to trust.

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 1, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org