{"schemaVersion":3,"id":"CVE-2026-29051","aliases":["GHSA-q2pw-xx38-p64j","GO-2026-5562"],"status":"published","duplicateOf":null,"title":null,"description":"melange allows users to build apk packages using declarative pipelines. Starting in version 0.32.0 and prior to version 0.43.4, `melange lint --persist-lint-results` (opt-in flag, also usable via `melange build --persist-lint-results`) constructs output file paths by joining `--out-dir` with the `arch` and `pkgname` values read from the `.PKGINFO` control file of the APK being linted. In affected versions these values were not validated for path separators or `..` sequences, so an attacker who can supply an APK to a melange-based lint/build pipeline (e.g. CI that lints third-party APKs, or build-as-a-service) could cause melange to write `lint-<pkgname>-<pkgver>-r<epoch>.json` to an arbitrary `.json` path reachable by the melange process. The written file is a JSON lint report whose content is partially attacker-influenced. There is no direct code-execution path, but the write can clobber other JSON artifacts on the filesystem. The issue only affects deployments that explicitly pass `--persist-lint-results`; the flag is off by default. The issue is fixed in melange v0.43.4 by validating `arch` and `pkgname` for `..`, `/`, and `filepath.Separator` before path construction in `pkg/linter/results.go` (commit 84f3b45). As a workaround, do not pass `--persist-lint-results` when linting or building APKs whose `.PKGINFO` contents are not fully trusted. Running melange as a low-privileged user and confining writes to an isolated directory also limits impact.","dates":{"published":"2026-04-24T00:00:36.253Z","modified":"2026-04-24T13:10:10.825Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":4.4,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":4.4,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Go","score":3.3,"severity":"low","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","exploitability":4.6,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":3.3,"severity":"low","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00183,"percentile":0.07447,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.011000000000000006,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00172},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00183,"percentile":0.07447}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00183,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00183,"percentile":0.07447}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","description":"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.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"}],"affected":[{"vendor":"chainguard-dev","product":"melange","name":"melange","label":"melange","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 0.32.0, < 0.43.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.32.0, < 0.43.4","eol":null,"hubHref":"/vendor/chainguard-dev/melange"},{"vendor":"chainguard","product":"melange","name":"melange","label":"melange","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 0.32.0, < 0.43.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.32.0, < 0.43.4","eol":null,"hubHref":"/vendor/chainguard/melange"},{"vendor":"chainguard.dev","product":"melange","name":"chainguard.dev/melange","label":"melange","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/chainguard.dev/melange","purlType":"golang","versions":[{"text":"≥ 0.32.0, < 0.43.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.32.0, < 0.43.4","eol":null,"hubHref":null}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/chainguard-dev/melange/security/advisories/GHSA-q2pw-xx38-p64j","label":"github.com/chainguard-dev/melange/security/advisories/GHSA-q2pw-xx38-p64j","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory","Mitigation","Patch","Vendor Advisory"]},{"url":"https://github.com/chainguard-dev/melange/commit/84f3b450ce6e472c4abb8dc4c26d0ce8ac1259ac","label":"github.com/chainguard-dev/melange/commit/84f3b450ce6e472c4abb8dc4c26d0ce8ac1259ac","hostname":"github.com","tags":["X Refsource MISC","WEB","Patch"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-29051","label":"nvd.nist.gov/vuln/detail/CVE-2026-29051","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/chainguard-dev/melange","label":"github.com/chainguard-dev/melange","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":["OPENSUSE-SU-2026:21483-1"],"duplicates":[],"related":["OPENSUSE-SU-2026:21483-1"]},"timeline":[{"kind":"published","date":"2026-04-24T00:00:36.253Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-04-24T13:10:10.825Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":18,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T17:06:09.685Z","stale":false,"partial":false}}