{"id":"CVE-2026-25145","aliases":["CVE-2026-25145","GHSA-2w4f-9fgg-q2v9","GO-2026-4409"],"related":["CGA-jjh7-p782-2x93"],"kind":"vulnerability","state":"published","title":"melange has a path traversal in license-path which allows reading files outside workspace","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"melange has a path traversal in license-path which allows reading files outside workspace in chainguard.dev/melange","format":"markdown","source":"go"},{"lang":"es","text":"melange permite a los usuarios construir paquetes apk utilizando pipelines declarativos. Desde la versión 0.14.0 hasta antes de la 0.40.3, un atacante que pueda influir en un archivo de configuración de melange (por ejemplo, a través de CI impulsado por solicitudes de extracción o escenarios de construcción como servicio) podría leer archivos arbitrarios del sistema anfitrión. La función LicensingInfos en pkg/config/config.go lee archivos de licencia especificados en copyright[].license-path sin validar que las rutas permanezcan dentro del directorio del espacio de trabajo, permitiendo el salto de ruta a través de secuencias ../. El contenido del archivo recorrido se incrusta en el SBOM generado como texto de licencia, lo que permite la exfiltración de datos sensibles a través de artefactos de construcción. Este problema ha sido parcheado en la versión 0.40.3.","source":"nvd"}],"published":"2026-02-04T00:09:57.000Z","modified":"2026-09-10T03:50:33.764Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":">= 0.14.0, < 0.40.3","status":"affected"}],"vendor":"chainguard-dev","product":"melange","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.14.0","status":"affected","fixed":"0.40.3"}],"ecosystem":"Go","package":"chainguard.dev/melange","purl":"pkg:golang/chainguard.dev/melange","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.14.0","status":"affected","fixed":"0.40.3"}],"ecosystem":"Go","package":"chainguard.dev/melange","purl":"pkg:golang/chainguard.dev/melange","source":"go"},{"ranges":[{"status":"affected","introduced":"0.14.0","fixed":"0.40.5"}],"vendor":"chainguard","product":"melange","cpe":"cpe:2.3:a:chainguard:melange:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/chainguard-dev/melange/security/advisories/GHSA-2w4f-9fgg-q2v9","tags":["advisory","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/chainguard-dev/melange/commit/2f95c9f4355ed993f2670bf1bb82d88b0f65e9e4","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25145","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/chainguard-dev/melange","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-05T14:20:16.275Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25145","url":"https://www.cve.org/CVERecord?id=CVE-2026-25145","licence":"CVE Terms of Use","modified":"2026-02-05T14:32:56.438Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2w4f-9fgg-q2v9","url":"https://github.com/advisories/GHSA-2w4f-9fgg-q2v9","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:33.764Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4409","url":"https://pkg.go.dev/vuln/GO-2026-4409","licence":"CC-BY-4.0","modified":"2026-02-05T16:28:57.089Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25145","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25145","licence":"Public domain","modified":"2026-06-17T10:24:11.197Z"}],"updatedAt":"2026-11-25T22:59:13.496Z","epss":{"score":0.00214,"percentile":0.06691,"date":"2026-11-30T12:00:22.000Z"}}