# CVE-2026-103061: Path traversal in Gleam via unvalidated package application names

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Active; Confidentiality impact: None; Integrity impact: None; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.50% (percentile 44, 2026-12-01)
- **CWE:** CWE-22
- **Published:** 2026-10-12T18:23:41.507Z
- **Modified:** 2026-11-20T06:17:16.057Z

## Who should check

- Anyone running Gleam \>= v0.32.4-elixir, \< v1.19.2-elixir; \>= v0.32.4-erlang, \< v1.19.2-erlang; \>= v0.32.4-node, \< v1.19.2-node; \>= v0.32.4-node-slim, \< v1.19.2-node-slim; \>= v0.32.4-elixir-slim, \< v1.19.2-elixir-slim; \>= v0.32.4-erlang-slim, \< v1.19.2-erlang-slim; \>= v0.32.4-erlang-alpine, \< v1.19.2-erlang-alpine; \>= v0.32.4-elixir-alpine, \< v1.19.2-elixir-alpine; \>= v0.32.4-node-alpine, \< v1.19.2-node-alpine; \>= v0.32.4-scratch, \< v1.19.2-scratch
- Anyone running Gleam \>= 0.32.4, \< 1.19.2
- Anyone running Gleam \>= d13f27ee80aae7a521d2e9433c4deaf53f892574, \< \*

## Description

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in gleam-lang gleam allows a malicious package publisher to delete a directory outside the project's build directory when a developer builds a project.

A Hex package release's metadata carries an app field with the release's OTP application name. Gleam reads this field from the hex.pm release API when it downloads dependencies and uses it as the package's build directory name without validating it (hex\_manifest\_package in compiler-cli/src/dependencies.rs, ProjectPaths::build\_directory\_for\_package). When a dependency fails to compile, Gleam deletes that directory with remove\_dir\_all. hex.pm didn't restrict the field to a directory name before 2026-10-12, so a publisher could set it to a value such as ../../../../target or an absolute path. When a project depends on such a release directly or transitively and the release fails to compile, gleam build, gleam check, gleam run, gleam test or gleam export deletes the directory the name resolves to. For a pure Gleam package no publisher code runs.

This issue affects gleam: from 0.32.4 before 1.19.2.

## Affected and fixed versions

- Gleam: \>= v0.32.4-elixir, \< v1.19.2-elixir; \>= v0.32.4-erlang, \< v1.19.2-erlang; \>= v0.32.4-node, \< v1.19.2-node; \>= v0.32.4-node-slim, \< v1.19.2-node-slim; \>= v0.32.4-elixir-slim, \< v1.19.2-elixir-slim; \>= v0.32.4-erlang-slim, \< v1.19.2-erlang-slim; \>= v0.32.4-erlang-alpine, \< v1.19.2-erlang-alpine; \>= v0.32.4-elixir-alpine, \< v1.19.2-elixir-alpine; \>= v0.32.4-node-alpine, \< v1.19.2-node-alpine; \>= v0.32.4-scratch, \< v1.19.2-scratch (cvelist)
- Gleam: \>= 0.32.4, \< 1.19.2 (cvelist)
- Gleam: \>= d13f27ee80aae7a521d2e9433c4deaf53f892574, \< \* (cvelist)

## Mitigation

- Upgrade Gleam to 1.19.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-103061. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-103061.md
Affected: Gleam >= v0.32.4-elixir, < v1.19.2-elixir; >= v0.32.4-erlang, < v1.19.2-erlang; >= v0.32.4-node, < v1.19.2-node; >= v0.32.4-node-slim, < v1.19.2-node-slim; >= v0.32.4-elixir-slim, < v1.19.2-elixir-slim; >= v0.32.4-erlang-slim, < v1.19.2-erlang-slim; >= v0.32.4-erlang-alpine, < v1.19.2-erlang-alpine…
Fixed in: Gleam 1.19.2

Steps:
1. Search this machine and project for Gleam: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-103061 being exploited?

There is no confirmed exploitation: CVE-2026-103061 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.50% chance of exploitation in the next 30 days (as of 2026-12-01).

### How serious is CVE-2026-103061?

Medium: CVSS 5.9 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-103061?

Gleam \>= v0.32.4-elixir, \< v1.19.2-elixir; \>= v0.32.4-erlang, \< v1.19.2-erlang; \>= v0.32.4-node, \< v1.19.2-node; \>= v0.32.4-node-slim, \< v1.19.2-node-slim; \>= v0.32.4-elixir-slim, \< v1.19.2-elixir-slim; \>= v0.32.4-erlang-slim, \< v1.19.2-erlang-slim; \>= v0.32.4-erlang-alpine, \< v1.19.2-erlang-alpine; \>= v0.32.4-elixir-alpine, \< v1.19.2-elixir-alpine; \>= v0.32.4-node-alpine, \< v1.19.2-node-alpine; \>= v0.32.4-scratch, \< v1.19.2-scratch; Gleam \>= 0.32.4, \< 1.19.2; Gleam \>= d13f27ee80aae7a521d2e9433c4deaf53f892574, \< \*.

### Is there a fix for CVE-2026-103061?

Yes. Fixed in Gleam 1.19.2. Upgrade Gleam to 1.19.2 or later.

### How do I check if I'm affected by CVE-2026-103061?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/gleam-lang/gleam/security/advisories/GHSA-jhcr-c7qm-8589>
- patch: <https://github.com/gleam-lang/gleam/commit/d13f27ee80aae7a521d2e9433c4deaf53f892574>
- patch: <https://github.com/gleam-lang/gleam/commit/54bbb2b98af1505b6eed93c45b1936fc76412e5c>
- patch: <https://github.com/gleam-lang/gleam/commit/d15c981fac6e533d70ac8ee89a6ef4dbf139adc3>
- other: <https://cna.erlef.org/cves/CVE-2026-103061.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-103061>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-103061>

HTML: <https://flawdb.com/CVE-2026-103061> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-103061>
