cve.bz

CVE-2026-103061 gleam gleam: Path traversal

5.9 mediumEPSS 0.4%

Medium (5.9) in gleam gleam. EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

5.9 medium
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
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 35th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-10-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
Assigned by
EEF (CNA)
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-103061 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-103061?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-103061?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-103061 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Gleamfrom 0.32.4 before 1.19.2
Gleamfrom v0.32.4-elixir before v1.19.2-elixir
Gleamfrom v0.32.4-erlang before v1.19.2-erlang
Gleamfrom v0.32.4-node before v1.19.2-node
Gleamfrom v0.32.4-node-slim before v1.19.2-node-slim
Gleamfrom v0.32.4-elixir-slim before v1.19.2-elixir-slim
Gleamfrom v0.32.4-erlang-slim before v1.19.2-erlang-slim
Gleamfrom v0.32.4-erlang-alpine before v1.19.2-erlang-alpine
Gleamfrom v0.32.4-elixir-alpine before v1.19.2-elixir-alpine
Gleamfrom v0.32.4-node-alpine before v1.19.2-node-alpine
Gleamfrom v0.32.4-scratch before v1.19.2-scratch

Linux distributions

DistributionReleasePackageFixed inAdvisory
openSUSETumbleweedgleam1.19.2-1.1openSUSE-SU-2026:12454-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

An IMPORTANT severity path traversal flaw was found in the Gleam build tool (gleam). Gleam reads a Hex package release's OTP application name from the hex.pm release API when it downloads dependencies and uses it, without validation, as the package's build directory name. A malicious package publisher could set this publisher-controlled metadata field to path traversal sequences or an absolute path; when a project that depends on such a release directly or transitively is built and the dependency fails to compile, Gleam recursively deletes the directory the name resolves to, allowing deletion of arbitrary directories and files accessible to the user running the build. The deletion is triggered by gleam build, gleam check, gleam run, gleam test, and gleam export, but not by gleam deps download alone, and for a pure Gleam package no publisher code runs. Exploitation requires a developer or CI process to build a project containing a malicious dependency, which is why Red Hat scores this flaw as IMPORTANT with a local attack vector (CVSS 3.1 score 7.1, CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H), whereas the upstream CVEORG record assigns a CVSS 4.0 score of 5.9 (MODERATE), treating the flaw as network-exploitable with attacker participation and user interaction required and impact limited to availability.

Within Red Hat's product scope, gleam is affected as a build-time dependency of gjs in Red Hat Enterprise Linux rhel-br-9 streams and mozjs60 in Red Hat Enterprise Linux 8 streams, of firefox and thunderbird in Red Hat In-Vehicle OS, and of community (Fedora and EPEL) components including icecat, firefox, mozjs115, mozjs128, mozjs140, seamonkey, and thunderbird. firefox and thunderbird as shipped in Red Hat Enterprise Linux 7, 8, 9, and 10 are not affected because the vulnerable gleam component is not present in those builds. Fixes for the affected products are being pursued through the responsible maintainers.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. Upstream, the issue is fixed in Gleam 1.19.2, which validates the OTP application name used to form dependency build directories; users who build projects with Gleam directly should upgrade to Gleam 1.19.2 or later. Note that hex.pm has rejected application names that are not plain directory names for releases published since 2026-10-12, so only dependency releases published before that date can carry a malicious application name. For affected Red Hat products, updated packages will be provided through the respective product streams.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10firefoxNot affected
Red Hat Enterprise Linux 10thunderbirdNot affected
Red Hat Enterprise Linux 7firefoxNot affected
Red Hat Enterprise Linux 8firefoxNot affected
Red Hat Enterprise Linux 8mozjs60Affected
Red Hat Enterprise Linux 8thunderbirdNot affected
Red Hat Enterprise Linux 9firefoxNot affected
Red Hat Enterprise Linux 9thunderbirdNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-103061.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON