{"id":"CVE-2026-25145","published":"2026-02-04T19:32:35Z","modified":"2026-02-05T14:32:56Z","title":"melange has a path traversal in license-path which allows reading files outside workspace","vendor":"chainguard-dev","product":"melange","tier":"tail","description":{"text":"melange allows users to build apk packages using declarative pipelines. From version 0.14.0 to before 0.40.3, 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. This issue has been patched in version 0.40.3.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00191,"percentile":0.08947,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/chainguard-dev/melange/security/advisories/GHSA-2w4f-9fgg-q2v9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/chainguard-dev/melange/commit/2f95c9f4355ed993f2670bf1bb82d88b0f65e9e4","tags":["x_refsource_MISC"]}],"priority":{"score":5.6,"factors":[{"name":"EPSS percentile","points":1.79},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"chainguard-dev","affectedVersions":[{"vendor":"chainguard-dev","product":"melange","versions":[">= 0.14.0, < 0.40.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-02-05T14:20:16.275847Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"chainguard.dev/melange","vulnerableRanges":[">=0.14.0, <0.40.3"],"patched":["0.40.3"],"from":["GHSA-2w4f-9fgg-q2v9","GO-2026-4409"],"provenance":"source"}],"summary":{"text":"The melange build tool's license-path handling in the LicensingInfos function (pkg/config/config.go) does not confine paths to the workspace directory, so a license-path entry in copyright[] configuration can traverse outside it with ../ sequences. An attacker who can influence a melange configuration file, such as through pull request-driven CI or build-as-a-service workflows, and who needs a user or pipeline to trigger the build, can read arbitrary host files whose contents are embedded into the generated SBOM as license text and exfiltrated through build artifacts.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:18:57Z"},"euvd":{"id":"EUVD-2026-5370","exploited":false,"provenance":"source"}}