{"id":"CVE-2026-47078","aliases":["CVE-2026-47078","EEF-CVE-2026-47078","GHSA-rf72-wp7h-jg3x"],"related":[],"kind":"vulnerability","state":"published","title":"Relative path traversal in zip:unzip/zip:extract via check_dir_level depth-counter bypass","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nRelative Path Traversal vulnerability in Erlang OTP (stdlib zip module) allows writing files outside the intended extraction directory via a crafted zip archive.\n\n`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`.\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.","format":"markdown","source":"eef"},{"lang":"es","text":"Vulnerabilidad de salto de ruta relativo en Erlang OTP (módulo zip de stdlib) permite escribir archivos fuera del directorio de extracción previsto mediante un archivo zip manipulado.\n\nzip:unzip/1,2 y zip:extract/1,2 validan las rutas de entrada usando zip:check_dir_level/2, que rastrea la profundidad del directorio como un contador entero en ejecución: .. lo decrementa, los componentes de ruta normales lo incrementan. El llamador rechaza solo las rutas donde el valor final del contador es menor que cero. Una ruta como .. / x/y hace que el contador se vuelva negativo a mitad del recorrido y luego se recupere a cero, pasando la validación mientras se resuelve a una ubicación fuera del directorio de extracción cuando se une con el directorio de trabajo actual a través de add_cwd.\n\nEsta vulnerabilidad está asociada con el archivo de programa lib/stdlib/src/zip.erl.\n\nEste problema afecta a OTP desde OTP 27.1 antes de OTP 29.0.4, OTP 28.5.0.4 y OTP 27.3.4.15, correspondiendo a stdlib desde 6.1 antes de 8.0.3, 7.3.0.1 y 6.2.2.4.","source":"nvd"}],"published":"2026-07-27T15:03:50.929Z","modified":"2026-11-25T06:30:23.731Z","severity":{"scorer":"EEF","scheme":"CVSS: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","score":4.8,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS: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","score":4.8,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS: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"}],"cwes":["CWE-23"],"affected":[{"ranges":[{"type":"otp","introduced":"6.1","fixed":"*","status":"affected"}],"vendor":"Erlang","product":"OTP","package":"stdlib","cpe":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","repo":"https://github.com/erlang/otp","source":"cvelist"},{"ranges":[{"type":"otp","introduced":"27.1","fixed":"*","status":"affected"}],"vendor":"Erlang","product":"OTP","package":"otp","cpe":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"git","introduced":"8d537f51a4262d24f3395c4148323eaca9facbbd","fixed":"8a933c9c7835b06776d31d17b79b7336627d887a","status":"affected"}],"vendor":"Erlang","product":"OTP","package":"erlang/otp","cpe":"cpe:2.3:a:erlang:erlang\\/otp:*:*:*:*:*:*:*:*","repo":"https://github.com/erlang/otp","source":"cvelist"},{"ranges":[{"type":"git","introduced":"8d537f51a4262d24f3395c4148323eaca9facbbd","status":"affected","fixed":"8a933c9c7835b06776d31d17b79b7336627d887a"}],"repo":"https://github.com/erlang/otp","source":"eef"}],"references":[{"url":"https://github.com/erlang/otp/security/advisories/GHSA-rf72-wp7h-jg3x","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-47078.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-47078","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://www.erlang.org/doc/system/versions.html#order-of-versions","tags":["web","x-version-scheme"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/erlang/otp/commit/8d537f51a4262d24f3395c4148323eaca9facbbd","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/erlang/otp/commit/8a933c9c7835b06776d31d17b79b7336627d887a","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]}],"credits":["Jonatan Männchen / EEF","Zhang Delong","John Högberg"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-27T18:38:46.508Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47078","url":"https://www.cve.org/CVERecord?id=CVE-2026-47078","licence":"CVE Terms of Use","modified":"2026-11-20T06:02:09.119Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-47078","url":"https://osv.dev/vulnerability/EEF-CVE-2026-47078","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:23.731Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47078","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47078","licence":"Public domain","modified":"2026-11-20T06:17:28.310Z"}],"updatedAt":"2026-11-25T22:59:30.206Z","epss":{"score":0.0015,"percentile":0.04396,"date":"2026-12-01T12:00:22.000Z"}}