CVE-2026-29051: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-dev melange
CVE-2026-29051 is a path traversal vulnerability in chainguard-dev's melange versions from 0. 32. 0 up to but not including 0. 43. 4. When the --persist-lint-results flag is used, melange constructs output file paths from unvalidated values in the APK's . PKGINFO file, allowing an attacker supplying a malicious APK to cause melange to write JSON lint reports to arbitrary filesystem locations. This can overwrite existing JSON files but does not allow direct code execution. The vulnerability only affects deployments explicitly using the --persist-lint-results option, which is off by default. The issue is fixed in version 0.
AI Analysis
Technical Summary
Melange is a tool for building APK packages using declarative pipelines. In affected versions (>=0.32.0 and <0.43.4), when the opt-in flag --persist-lint-results is used, melange constructs output file paths by joining the --out-dir parameter with the arch and pkgname values read from the APK's .PKGINFO control file. These values were not validated for path separators or '..' sequences, enabling a path traversal vulnerability (CWE-22). An attacker who can supply an APK to a melange-based lint/build pipeline can cause melange to write the lint JSON report to arbitrary paths accessible by the melange process, potentially overwriting existing JSON artifacts. There is no direct code execution vector. The vulnerability is fixed in melange v0.43.4 by validating arch and pkgname for invalid path characters before path construction. The vulnerability only applies when --persist-lint-results is explicitly enabled.
Potential Impact
An attacker able to supply APKs to a melange lint/build pipeline that uses the --persist-lint-results flag can cause arbitrary file write of JSON lint reports to paths outside the intended output directory. This can overwrite existing JSON files, potentially disrupting build or lint artifacts. There is no direct impact on confidentiality or code execution. The impact is limited to integrity and availability of JSON lint report files. The vulnerability does not affect default melange usage since the flag is off by default.
Mitigation Recommendations
The vulnerability is fixed in melange version 0.43.4 by validating input values before path construction. Users should upgrade to version 0.43.4 or later. As a workaround, do not use the --persist-lint-results flag when linting or building APKs with untrusted .PKGINFO contents. Running melange as a low-privileged user and restricting write permissions to an isolated directory further limits potential impact. Patch status is not explicitly stated in vendor advisory content, but the fix is included in version 0.43.4.
CVE-2026-29051: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-dev melange
Description
CVE-2026-29051 is a path traversal vulnerability in chainguard-dev's melange versions from 0. 32. 0 up to but not including 0. 43. 4. When the --persist-lint-results flag is used, melange constructs output file paths from unvalidated values in the APK's . PKGINFO file, allowing an attacker supplying a malicious APK to cause melange to write JSON lint reports to arbitrary filesystem locations. This can overwrite existing JSON files but does not allow direct code execution. The vulnerability only affects deployments explicitly using the --persist-lint-results option, which is off by default. The issue is fixed in version 0.
CVSS v3.1
Score 4.4medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Melange is a tool for building APK packages using declarative pipelines. In affected versions (>=0.32.0 and <0.43.4), when the opt-in flag --persist-lint-results is used, melange constructs output file paths by joining the --out-dir parameter with the arch and pkgname values read from the APK's .PKGINFO control file. These values were not validated for path separators or '..' sequences, enabling a path traversal vulnerability (CWE-22). An attacker who can supply an APK to a melange-based lint/build pipeline can cause melange to write the lint JSON report to arbitrary paths accessible by the melange process, potentially overwriting existing JSON artifacts. There is no direct code execution vector. The vulnerability is fixed in melange v0.43.4 by validating arch and pkgname for invalid path characters before path construction. The vulnerability only applies when --persist-lint-results is explicitly enabled.
Potential Impact
An attacker able to supply APKs to a melange lint/build pipeline that uses the --persist-lint-results flag can cause arbitrary file write of JSON lint reports to paths outside the intended output directory. This can overwrite existing JSON files, potentially disrupting build or lint artifacts. There is no direct impact on confidentiality or code execution. The impact is limited to integrity and availability of JSON lint report files. The vulnerability does not affect default melange usage since the flag is off by default.
Mitigation Recommendations
The vulnerability is fixed in melange version 0.43.4 by validating input values before path construction. Users should upgrade to version 0.43.4 or later. As a workaround, do not use the --persist-lint-results flag when linting or building APKs with untrusted .PKGINFO contents. Running melange as a low-privileged user and restricting write permissions to an isolated directory further limits potential impact. Patch status is not explicitly stated in vendor advisory content, but the fix is included in version 0.43.4.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-03T17:50:11.243Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69eab7a187115cfb68850e1b
Added to database: 4/24/2026, 12:21:53 AM
Last enriched: 5/1/2026, 8:48:49 PM
Last updated: 6/7/2026, 8:27:30 AM
Views: 64
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.