CVE-2026-47078
Relative path traversal in zip:unzip/zip:extract via check_dir_level depth-counter bypass
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.
INFO
Published Date :
July 27, 2026, 4:17 p.m.
Last Modified :
July 27, 2026, 4:17 p.m.
Remotely Exploit :
No
Source :
6b3ad84c-e1a6-4bf7-a703-f496b71e49db
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 4.0 | MEDIUM | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | ||||
| CVSS 4.0 | MEDIUM | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db |
Solution
- Update Erlang OTP to version 27.3.4.15 or later.
- Update Erlang OTP to version 28.5.0.4 or later.
- Update Erlang OTP to version 29.0.4 or later.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-47078.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-47078 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-47078
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-47078 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-47078 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Jul. 27, 2026
Action Type Old Value New Value Added Affected [{'cpes': ['cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/erlang/otp', 'vendor': 'Erlang', 'modules': ['zip'], 'product': 'OTP', 'versions': [{'status': 'affected', 'changes': [{'at': '8.0.3', 'status': 'unaffected'}, {'at': '7.3.0.1', 'status': 'unaffected'}, {'at': '6.2.2.4', 'status': 'unaffected'}], 'version': '6.1', 'lessThan': '*', 'versionType': 'otp'}], 'packageURL': 'pkg:otp/stdlib?repository_url=https:%2F%2Fgithub.com%2Ferlang%2Fotp&vcs_url=git%20https:%2F%2Fgithub.com%2Ferlang%2Fotp.git', 'packageName': 'stdlib', 'programFiles': ['src/zip.erl'], 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'zip:unzip/1'}, {'name': 'zip:unzip/2'}, {'name': 'zip:extract/1'}, {'name': 'zip:extract/2'}, {'name': 'zip:check_dir_level/2'}]}, {'cpes': ['cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/erlang/otp', 'vendor': 'Erlang', 'modules': ['zip'], 'product': 'OTP', 'versions': [{'status': 'affected', 'changes': [{'at': '29.0.4', 'status': 'unaffected'}, {'at': '28.5.0.4', 'status': 'unaffected'}, {'at': '27.3.4.15', 'status': 'unaffected'}], 'version': '27.1', 'lessThan': '*', 'versionType': 'otp'}, {'status': 'affected', 'version': '8d537f51a4262d24f3395c4148323eaca9facbbd', 'lessThan': '8a933c9c7835b06776d31d17b79b7336627d887a', 'versionType': 'git'}], 'packageURL': 'pkg:github/erlang/otp', 'packageName': 'erlang/otp', 'programFiles': ['lib/stdlib/src/zip.erl'], 'collectionURL': 'https://github.com', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'zip:unzip/1'}, {'name': 'zip:unzip/2'}, {'name': 'zip:extract/1'}, {'name': 'zip:extract/2'}, {'name': 'zip:check_dir_level/2'}]}] 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. Added CVSS V4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:L/SC:N/SI:L/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CWE CWE-23 Added Reference https://cna.erlef.org/cves/CVE-2026-47078.html Added Reference https://github.com/erlang/otp/commit/8a933c9c7835b06776d31d17b79b7336627d887a Added Reference https://github.com/erlang/otp/security/advisories/GHSA-rf72-wp7h-jg3x Added Reference https://osv.dev/vulnerability/EEF-CVE-2026-47078 Added Reference https://www.erlang.org/doc/system/versions.html#order-of-versions