{"id":"CVE-2026-47078","published":"2026-07-27T15:03:50Z","modified":"2026-11-20T06:02:09Z","title":"Relative path traversal in zip:unzip/zip:extract via check_dir_level depth-counter bypass","vendor":"Erlang","product":"OTP","tier":"tail","description":{"text":"Relative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive.\n\nzip: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.\n\nThis vulnerability is associated with program file lib/stdlib/src/zip.erl.\n\nThis 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00192,"percentile":0.05101,"provenance":"source"},"cwes":[{"id":"CWE-23","name":"Relative Path Traversal"}],"references":[{"url":"https://github.com/erlang/otp/security/advisories/GHSA-rf72-wp7h-jg3x","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-47078.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-47078","tags":["related"]},{"url":"https://www.erlang.org/doc/system/versions.html#order-of-versions","tags":["x_version-scheme"]},{"url":"https://github.com/erlang/otp/commit/8d537f51a4262d24f3395c4148323eaca9facbbd","tags":["related"]},{"url":"https://github.com/erlang/otp/commit/8a933c9c7835b06776d31d17b79b7336627d887a","tags":["patch"]}],"priority":{"score":4.4,"factors":[{"name":"EPSS percentile","points":1.02},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"erlang","affectedVersions":[{"vendor":"Erlang","product":"OTP","versions":[">= 6.1"]},{"vendor":"Erlang","product":"OTP","versions":[">= 27.1"]},{"vendor":"Erlang","product":"OTP","versions":[">= 8d537f51a4262d24f3395c4148323eaca9facbbd, < 8a933c9c7835b06776d31d17b79b7336627d887a"]}],"fixedVersions":[{"vendor":"Erlang","product":"OTP","versions":["6.2.2.4","7.3.0.1","8.0.3"]},{"vendor":"Erlang","product":"OTP","versions":["27.3.4.15","28.5.0.4","29.0.4"]}],"capec":[{"id":"CAPEC-139","name":"Relative Path Traversal"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-27T18:38:46.508080Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-49317","exploited":false,"provenance":"source"}}