Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. chainguard.dev/melange
  4. ›
  5. CVE-2026-25145

CVE-2026-25145: melange has a path traversal in license-path which allows reading files outside workspace

February 4, 2026

An attacker who can influence a melange configuration file (e.g., through pull request-driven CI or build-as-a-service scenarios) could read arbitrary files from the host system. The LicensingInfos function in pkg/config/config.go reads license files specified in copyright[].license-path without validating that paths remain within the workspace directory, allowing path traversal via ../ sequences. The contents of the traversed file are embedded into the generated SBOM as license text, enabling exfiltration of sensitive data through build artifacts.

Fix: Merged in commit 2f95c9f4

Acknowledgements

melange thanks Oleh Konko (@1seal) from 1seal for discovering and reporting this issue.

References

  • github.com/advisories/GHSA-2w4f-9fgg-q2v9
  • github.com/chainguard-dev/melange
  • github.com/chainguard-dev/melange/commit/2f95c9f4355ed993f2670bf1bb82d88b0f65e9e4
  • github.com/chainguard-dev/melange/security/advisories/GHSA-2w4f-9fgg-q2v9
  • nvd.nist.gov/vuln/detail/CVE-2026-25145

Code Behaviors & Features

Detect and mitigate CVE-2026-25145 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.14.0 before 0.40.3

Fixed versions

  • 0.40.3

Solution

Upgrade to version 0.40.3 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

go/chainguard.dev/melange/CVE-2026-25145.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 12:19:06 +0000.