Description
Relative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive.

zip:unzip/1,2 and zip:extract/1,2 validate entry paths using zip:check_dir_level/2, which tracks directory depth as a running integer counter: .. decrements it, normal path components increment it. The caller rejects only paths where the final counter value is less than zero. A path such as ../x/y causes the counter to go negative mid-traversal then recover to zero, passing validation while resolving to a location outside the extraction directory when joined with the current working directory via add_cwd.

This vulnerability is associated with program file lib/stdlib/src/zip.erl.

This issue affects OTP from OTP 27.1 before OTP 27.3.4.15, OTP 28.5.0.4, and OTP 29.0.4, corresponding to stdlib from 6.1 before 6.2.2.4, 7.3.0.1, and 8.0.3.
Published: 2026-07-27
Score: 4.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary File Write via Path Traversal
Action: Patch Now
AI Analysis

Impact

A crafted zip archive can cause the Erlang OTP standard library zip module to write files outside the intended extraction directory by exploiting a flaw in the path validation routine zip:check_dir_level/2. The routine counts directory depth, decrementing for ".." components and incrementing for normal components, and only rejects paths whose final counter is negative. Paths that temporarily go negative and then recover, such as "../x/y", pass validation. When the path is joined with the current working directory, the resulting location lies outside the intended base directory, giving an attacker the ability to create or overwrite files wherever the OTP process has write permission. This is a classic relative path traversal weakness (CWE‑22 / CWE‑23) that can compromise configuration files, binaries, or other critical data. Affected systems: The vulnerability exists in Erlang OTP releases from 27.1 up to but excluding 27.3.4.15, as well as in the standalone OTP releases 28.5.0.4 and 29.0.4. These OTP releases correspond to stdlib major versions 6.1 (up to before 6.2.2.4), 7.3.0.1 (for OTP 28.5.0.4), and 8.0.3 (for OTP 29.0.4). Any installation using these OTP or stdlib versions is susceptible. Updated OTP releases that include the patched stdlib zip module (OTP 27.3.4.15 or later, OTP 28.5.0.5 or later, OTP 29.0.5 or later) are not affected. Risk and exploitability: The CVSS v3.1 score of 4.8 indicates moderate severity, while the EPSS score of less than 1% denotes a very low but nonzero likelihood of exploitation. The vulnerability is not listed in CISA’s KEV catalog, suggesting no known widespread exploitation yet. The likely attack vector is the delivery of a malicious zip archive to an application that invokes OTP’s zip:unzip or zip:extract functions. If an OTP-based service processes untrusted archives, the risk is higher; otherwise, a cautious approach is warranted, with patching recommended as the priority.

Affected Systems

Erlang OTP versions 27.1 through 27.3.4.14, 28.5.0.4, and 29.0.4 are affected; the corresponding stdlib releases are 6.1 (up to before 6.2.2.4), 7.3.0.1, and 8.0.3 respectively. Upgrading to OTP 27.3.4.15 or newer, OTP 28.5.0.5 or newer, or OTP 29.0.5 or newer eliminates the flaw.

Risk and Exploitability

The CVSS score of 4.8 signals moderate risk. EPSS below 1% indicates a very low yet nonzero exploitation probability, and the vulnerability is not currently listed in KEV. Attackers would need to supply a crafted zip archive to the vulnerable functions for exploitation. Systems that accept untrusted archives are at higher risk, warranting immediate patching.

Generated by OpenCVE AI on September 26, 2026 at 06:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Erlang OTP to a patched release—OTP 27.3.4.15 or later for the 27.x series, OTP 28.5.0.5 or later for the 28.x series, and OTP 29.0.5 or later for the 29.x series. Updating to these releases includes the fixed stdlib zip module that removes the path‐validation flaw.
  • Rebuild or redeploy any applications that depend on the older OTP distribution to ensure they link against the corrected standard library.
  • As a temporary mitigation, refrain from extracting untrusted zip archives with OTP’s zip:unzip or zip:extract. If extraction is unavoidable, implement custom path validation that rejects any entry starting with ".." or outside the target directory, or switch to a third‑party zip handling library that is not affected.

Generated by OpenCVE AI on September 26, 2026 at 06:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-6464-1 erlang security update
History

Thu, 24 Sep 2026 21:00:00 +0000

Type Values Removed Values Added
Description Relative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive. zip:unzip/1,2 and zip:extract/1,2 validate entry paths using zip:check_dir_level/2, which tracks directory depth as a running integer counter: .. decrements it, normal path components increment it. The caller rejects only paths where the final counter value is less than zero. A path such as ../x/y causes the counter to go negative mid-traversal then recover to zero, passing validation while resolving to a location outside the extraction directory when joined with the current working directory via add_cwd. This vulnerability is associated with program file lib/stdlib/src/zip.erl. This issue affects OTP from OTP 27.1 before OTP 29.0.4, OTP 28.5.0.4 and OTP 27.3.4.15, corresponding to stdlib from 6.1 before 8.0.3, 7.3.0.1 and 6.2.2.4. Relative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive. zip:unzip/1,2 and zip:extract/1,2 validate entry paths using zip:check_dir_level/2, which tracks directory depth as a running integer counter: .. decrements it, normal path components increment it. The caller rejects only paths where the final counter value is less than zero. A path such as ../x/y causes the counter to go negative mid-traversal then recover to zero, passing validation while resolving to a location outside the extraction directory when joined with the current working directory via add_cwd. This vulnerability is associated with program file lib/stdlib/src/zip.erl. This issue affects OTP from OTP 27.1 before OTP 27.3.4.15, OTP 28.5.0.4, and OTP 29.0.4, corresponding to stdlib from 6.1 before 6.2.2.4, 7.3.0.1, and 8.0.3.
References

Fri, 31 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L'}

threat_severity

Moderate


Tue, 28 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 27 Jul 2026 17:45:00 +0000

Type Values Removed Values Added
First Time appeared Erlang erlang/otp
Vendors & Products Erlang erlang/otp

Mon, 27 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Description Relative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive. zip:unzip/1,2 and zip:extract/1,2 validate entry paths using zip:check_dir_level/2, which tracks directory depth as a running integer counter: .. decrements it, normal path components increment it. The caller rejects only paths where the final counter value is less than zero. A path such as ../x/y causes the counter to go negative mid-traversal then recover to zero, passing validation while resolving to a location outside the extraction directory when joined with the current working directory via add_cwd. This vulnerability is associated with program file lib/stdlib/src/zip.erl. This issue affects OTP from OTP 27.1 before 27.3.4.15, 28.5.0.4, and 29.0.4 corresponding to stdlib from 6.1 before 6.2.2.4, 7.3.0.1, and 8.0.3. Relative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive. zip:unzip/1,2 and zip:extract/1,2 validate entry paths using zip:check_dir_level/2, which tracks directory depth as a running integer counter: .. decrements it, normal path components increment it. The caller rejects only paths where the final counter value is less than zero. A path such as ../x/y causes the counter to go negative mid-traversal then recover to zero, passing validation while resolving to a location outside the extraction directory when joined with the current working directory via add_cwd. This vulnerability is associated with program file lib/stdlib/src/zip.erl. This issue affects OTP from OTP 27.1 before OTP 29.0.4, OTP 28.5.0.4 and OTP 27.3.4.15, corresponding to stdlib from 6.1 before 8.0.3, 7.3.0.1 and 6.2.2.4.

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Description Relative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive. zip:unzip/1,2 and zip:extract/1,2 validate entry paths using zip:check_dir_level/2, which tracks directory depth as a running integer counter: .. decrements it, normal path components increment it. The caller rejects only paths where the final counter value is less than zero. A path such as ../x/y causes the counter to go negative mid-traversal then recover to zero, passing validation while resolving to a location outside the extraction directory when joined with the current working directory via add_cwd. This vulnerability is associated with program file lib/stdlib/src/zip.erl. This issue affects OTP from OTP 27.1 before 27.3.4.15, 28.5.0.4, and 29.0.4 corresponding to stdlib from 6.1 before 6.2.2.4, 7.3.0.1, and 8.0.3.
Title Relative path traversal in zip:unzip/zip:extract via check_dir_level depth-counter bypass
First Time appeared Erlang
Erlang erlang\/otp
Weaknesses CWE-23
CPEs cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*
Vendors & Products Erlang
Erlang erlang\/otp
References
Metrics cvssV4_0

{'score': 4.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:L/SC:N/SI:L/SA:L'}


Subscriptions

Erlang Erlang/otp Erlang\/otp
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-09-24T20:48:37.203Z

Reserved: 2026-05-18T17:28:10.319Z

Link: CVE-2026-47078

cve-icon Vulnrichment

Updated: 2026-07-27T18:38:50.891Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-07-27T16:17:07.643

Modified: 2026-09-24T21:17:12.687

Link: CVE-2026-47078

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-27T15:03:50Z

Links: CVE-2026-47078 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-26T06:45:06Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-23

    Relative Path Traversal