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

Zip Slip Vulnerability

← Back to Glossary
By NHI Mgmt Group Updated October 25, 2026 Domain: Cyber Security

A Zip Slip vulnerability lets an attacker place malicious file paths inside an archive so extracted files overwrite or create unintended files on a system. In practice, insecure archive extraction fails to validate paths such as ../ sequences, allowing arbitrary file write, code execution, privilege abuse, or system compromise.

What Zip Slip Means in Practice

zip slip is a path traversal flaw in archive extraction, where filenames inside a ZIP or similar archive contain relative paths that escape the intended destination. The danger is not the archive itself, but the extraction logic that trusts attacker-controlled paths.

That makes Zip Slip a file handling problem with security consequences that can range from overwriting application files to planting executable content in a sensitive location. It often appears in update workflows, upload handlers, build tools, and any service that expands archives automatically.

Why Zip Slip Is Dangerous

The core issue is that archive extraction can become an arbitrary file write primitive if the extractor fails to normalise paths and reject traversal sequences such as ../ or absolute paths. Once an attacker can place files where the application did not intend, they may replace configuration, drop web-accessible content, or alter code paths.

That is why Zip Slip can lead to code execution, privilege abuse, or wider compromise even when the initial action looks like a routine file upload or decompression task. The exploitability depends on where the extracted files land and what the surrounding service later does with them.

Where Zip Slip Usually Appears

Zip Slip is most common in software that accepts archives from users or external systems and extracts them without strict path validation. Typical examples include file upload pipelines, backup restore jobs, CI and build systems, importers, and automation that processes third-party packages.

It is closely related to directory traversal, but the attack surface is broader because the malicious path is hidden inside the archive entry name rather than supplied directly to a file API. A secure extractor should treat archive metadata as untrusted input and constrain output to a known directory.

How Organisations Reduce Exposure

Prevention starts with secure extraction behaviour: canonicalise paths, reject traversal and absolute paths, and ensure extracted files stay inside the intended directory. Safe archive handling also means limiting what file types are accepted, isolating extraction locations, and avoiding automated trust in archive contents.

For teams hardening upload and extraction flows, the relevant controls are documented in the Path Traversal Guide and the File Upload Security Guide. Those practices are most effective when paired with secure-by-default handling that does not depend on developers remembering to sanitise every filename manually.

Risk and Threat Considerations

Zip Slip is dangerous because it turns archive extraction into a trust boundary failure. If the target process runs with enough permission, a malicious archive can overwrite application files, stage a web shell, poison configuration, or alter scripts that execute later.

Failure mechanism: The extractor accepts archive entry names as-is, fails to resolve them against a fixed root, and writes files outside the intended extraction directory.

Impact: Attackers may gain arbitrary file write, persistence through planted files, code execution, or privilege escalation if the written location is security-sensitive.

Standards & Framework Alignment

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

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

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5SI-10 — Information Input ValidationZip Slip is an untrusted input handling flaw in archive entry paths.
CM-6 — Configuration SettingsSafe extraction depends on enforced filesystem and application configuration boundaries.
SC-28 — Protection of Information at RestArbitrary file write can expose or alter stored data and application assets.
Recommendation — Validate archive paths and reject traversal sequences before writing extracted files. Configure extraction routines to confine output to approved directories. Limit exposure by storing sensitive files in protected locations with restrictive access.
CIS Controls v8CIS-16 — Application SecurityZip Slip is a software flaw that belongs in secure application design and testing.
Recommendation — Test archive handling code for traversal flaws and unsafe file extraction behavior.
OWASP ASVSV5 — File HandlingZip Slip is a file handling weakness in how uploaded or received archives are processed.
Recommendation — Apply file-handling checks that constrain archive extraction paths and filenames.

Practitioner Guidance

What to watch for: Treat any feature that extracts user-controlled archives as a security-sensitive workflow, especially when it runs on servers, build agents, or automation with elevated file permissions. Review whether the code enforces a fixed extraction root and whether it rejects archive entries that resolve outside that root.

Practitioner note: When extraction cannot be fully trusted, isolate it in a constrained environment and verify the post-extraction filesystem state before downstream processing. The best time to stop Zip Slip is before the archive is expanded, not after a suspicious file has already landed.

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