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

- Severity: Medium 5.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 7% of CVEs (2026-11-30)
- Published: 2026-02-04T00:09:57.000Z
- Modified: 2026-09-10T03:50:33.764Z
- Also known as: GHSA-2w4f-9fgg-q2v9, GO-2026-4409
- Related: CGA-jjh7-p782-2x93
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- chainguard-dev melange: >= 0.14.0, < 0.40.3
- chainguard.dev/melange (Go): from 0.14.0 before 0.40.3
- chainguard melange: from 0.14.0 before 0.40.5

## Every score

- GitHub_M: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/chainguard-dev/melange/security/advisories/GHSA-2w4f-9fgg-q2v9> (advisory, patch, vendor-advisory, web)
- <https://github.com/chainguard-dev/melange/commit/2f95c9f4355ed993f2670bf1bb82d88b0f65e9e4> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25145> (advisory)
- <https://github.com/chainguard-dev/melange> (package)

## Sources

- CVE List: [CVE-2026-25145](https://www.cve.org/CVERecord?id=CVE-2026-25145), CVE Terms of Use, modified 2026-02-05
- GitHub Advisory Database: [GHSA-2w4f-9fgg-q2v9](https://github.com/advisories/GHSA-2w4f-9fgg-q2v9), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2026-4409](https://pkg.go.dev/vuln/GO-2026-4409), CC-BY-4.0, modified 2026-02-05
- NVD: [CVE-2026-25145](https://nvd.nist.gov/vuln/detail/CVE-2026-25145), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25145 · Whole record: https://cve.day/CVE-2026-25145.json · Rebuilt by cve.day 2026-11-25T22:59:13.496Z
