Skip to content

melange has a path traversal in license-path which allows reading files outside workspace

Moderate severity GitHub Reviewed Published Feb 3, 2026 in chainguard-dev/melange • Updated Feb 4, 2026

Package

gomod chainguard.dev/melange (Go)

Affected versions

>= 0.14.0, < 0.40.3

Patched versions

0.40.3

Description

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

@antitree antitree published to chainguard-dev/melange Feb 3, 2026
Published to the GitHub Advisory Database Feb 4, 2026
Reviewed Feb 4, 2026
Published by the National Vulnerability Database Feb 4, 2026
Last updated Feb 4, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

EPSS score

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

CVE ID

CVE-2026-25145

GHSA ID

GHSA-2w4f-9fgg-q2v9

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.