CVE-2023-39138
Swift vulnerability analysis and mitigation

Overview

An issue in ZIPFoundation v0.9.16 allows attackers to execute a path traversal attack via extracting a crafted zip file. The vulnerability was discovered in August 2023 and affects the ZIPFoundation Swift package, which is used by numerous developers and applications for handling ZIP archives (Ostorlab Blog).

Technical details

The vulnerability occurs because the package passes the path from the zip entry directory to the fileManager.createSymbolicLink function without proper validation. When extracting files, the package does not verify if symlinks are pointing to paths outside the extraction directory. This allows an attacker to create symbolic links that reference files outside the intended extraction location (Github Issue). The vulnerability has been assigned a CVSS v3.1 Base Score of 7.8 HIGH with vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability can lead to unauthorized file access and potential data exposure outside the intended extraction directory. An attacker can exploit this to overwrite sensitive data or shared object files, which might lead to code execution (Cybersecurity News).

Mitigation and workarounds

Users should upgrade to a patched version of ZIPFoundation that properly validates symbolic link destinations before extraction. Additionally, implementations should ensure proper validation of file paths and restrict symbolic link creation to within the intended extraction directory (NVD).

Additional resources


SourceThis report was generated using AI

Related Swift vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-54951CRITICAL9.8
  • JavaJava
  • executorch
NoYesAug 07, 2025
CVE-2025-54950CRITICAL9.8
  • JavaJava
  • executorch
NoYesAug 07, 2025
CVE-2025-54949CRITICAL9.8
  • JavaJava
  • org.pytorch:executorch-android
NoYesAug 07, 2025
CVE-2025-30405CRITICAL9.8
  • JavaJava
  • org.pytorch:executorch-android
NoYesAug 07, 2025
GHSA-xvr7-p2c6-j83wMEDIUM6.3
  • SwiftSwift
  • SwiftNIOHPACK
NoYesAug 13, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management