CVE-2026-47078: CWE-23 Relative Path Traversal in Erlang OTP
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.
AI Analysis
Technical Summary
The vulnerability in Erlang OTP's stdlib zip module (lib/stdlib/src/zip.erl) involves the zip:unzip/1,2 and zip:extract/1,2 functions which validate zip entry paths using a directory depth counter in zip:check_dir_level/2. The counter increments for normal path components and decrements for '..'. The validation only rejects paths if the final counter is negative, allowing crafted paths like '../x/y' that temporarily decrement the counter below zero but end at zero to bypass checks. This results in files being extracted outside the intended directory, leading to a relative path traversal vulnerability (CWE-23). The affected versions include OTP 27.1 up to but not including 29.0.4, OTP 28.5.0.4, and OTP 27.3.4.15, with corresponding stdlib versions from 6.1 up to but not including 8.0.3, 7.3.0.1, and 6.2.2.4 respectively. No vendor advisory or patch information is currently available.
Potential Impact
An attacker who can supply a crafted zip archive to the vulnerable functions can cause files to be written outside the intended extraction directory. This may lead to overwriting arbitrary files on the filesystem with the privileges of the process performing the extraction. The impact is limited by the local vector (AV:L) and requires user interaction (UI:P). The overall severity is medium with a CVSS score of 4.8.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid extracting untrusted zip archives using the vulnerable Erlang OTP stdlib zip module functions. Monitor Erlang OTP vendor channels for updates and apply official patches once released.
CVE-2026-47078: CWE-23 Relative Path Traversal in Erlang OTP
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.
CVSS v4.0
Score 4.8medium
Affected software
Erlang
OTP
Erlang
OTP
cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Erlang OTP's stdlib zip module (lib/stdlib/src/zip.erl) involves the zip:unzip/1,2 and zip:extract/1,2 functions which validate zip entry paths using a directory depth counter in zip:check_dir_level/2. The counter increments for normal path components and decrements for '..'. The validation only rejects paths if the final counter is negative, allowing crafted paths like '../x/y' that temporarily decrement the counter below zero but end at zero to bypass checks. This results in files being extracted outside the intended directory, leading to a relative path traversal vulnerability (CWE-23). The affected versions include OTP 27.1 up to but not including 29.0.4, OTP 28.5.0.4, and OTP 27.3.4.15, with corresponding stdlib versions from 6.1 up to but not including 8.0.3, 7.3.0.1, and 6.2.2.4 respectively. No vendor advisory or patch information is currently available.
Potential Impact
An attacker who can supply a crafted zip archive to the vulnerable functions can cause files to be written outside the intended extraction directory. This may lead to overwriting arbitrary files on the filesystem with the privileges of the process performing the extraction. The impact is limited by the local vector (AV:L) and requires user interaction (UI:P). The overall severity is medium with a CVSS score of 4.8.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid extracting untrusted zip archives using the vulnerable Erlang OTP stdlib zip module functions. Monitor Erlang OTP vendor channels for updates and apply official patches once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-05-18T17:28:10.319Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a677b449c2644c7f851280a
Added to database: 07/27/2026, 15:37:40 UTC
Last enriched: 07/30/2026, 00:10:00 UTC
Last updated: 09/10/2026, 20:02:53 UTC
Views: 88
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.