CVE-2026-25145: Chainguard.dev/melange Path Traversal Vulnerability
MODERATECVE-2026-25145 is a MODERATE (CVSS 5.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Chainguard.dev/melange libraries in the Go ecosystem. The issue involves melange has a path traversal in license-path which allows reading files outside workspace. Remediation is available by upgrading affected packages to version 0.40.3.
CVE-2026-25145 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-25145
To remediate this vulnerability, upgrade all affected Chainguard.dev/melange dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade chainguard.dev/melange to 0.40.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for chainguard.dev/melange
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-25145, inspect your project dependencies for Chainguard.dev/melange:
inspect dependencies for chainguard.dev/melange
Analyze the terminal output to locate any version of Chainguard.dev/melange in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.40.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In Chainguard.dev/melange, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-25145 Affected Chainguard.dev/melange Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
chainguard.dev/melange
|
Go |
≥ 0.14.0
< 0.40.3
|
0.40.3
|
References
Frequently Asked Questions
What is CVE-2026-25145?
Which Chainguard.dev/melange versions are affected?
What version fixes CVE-2026-25145?
Is chainguard.dev/melange affected?
What is the CVSS score of CVE-2026-25145?
What CWE is associated with CVE-2026-25145?
How can I check Go dependencies for CVE-2026-25145?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2w4f-9fgg-q2v9",
"modified" : "2026-02-04T21:56:16Z",
"published" : "2026-02-04T00:09:57Z",
"aliases" : [ "CVE-2026-25145" ],
"summary" : "melange has a path traversal in license-path which allows reading files outside workspace ",
"details" : "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. \n \n Fix: Merged in commit 2f95c9f4\n \n Acknowledgements \n \nmelange thanks Oleh Konko (@1seal) from 1seal for discovering and reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "chainguard.dev/melange"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.14.0"
}, {
"fixed" : "0.40.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/chainguard-dev/melange/security/advisories/GHSA-2w4f-9fgg-q2v9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25145"
}, {
"type" : "WEB",
"url" : "https://github.com/chainguard-dev/melange/commit/2f95c9f4355ed993f2670bf1bb82d88b0f65e9e4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/chainguard-dev/melange"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-04T00:09:57Z",
"nvd_published_at" : "2026-02-04T20:16:06Z"
}
}