CVE-2026-25145: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-dev melange
CVE-2026-25145 is a medium severity path traversal vulnerability in chainguard-dev's melange tool versions 0. 14. 0 up to before 0. 40. 3. It allows an attacker who can influence melange configuration files—such as via pull request-driven CI or build-as-a-service environments—to read arbitrary files on the host system. The vulnerability arises from insufficient validation of license file paths in the LicensingInfos function, enabling traversal outside the intended workspace directory. The contents of these files can then be embedded into the generated SBOM, facilitating exfiltration of sensitive data through build artifacts. This issue does not require privileges but does require user interaction to trigger a build with a malicious configuration. The flaw has been patched in version 0.
AI Analysis
Technical Summary
CVE-2026-25145 is a path traversal vulnerability classified under CWE-22 found in the melange tool developed by chainguard-dev, which is used for building apk packages via declarative pipelines. Specifically, versions from 0.14.0 to before 0.40.3 contain a flaw in the LicensingInfos function located in pkg/config/config.go. This function reads license files specified in the copyright[].license-path field without properly validating that the file paths remain confined within the intended workspace directory. An attacker capable of influencing the melange configuration file—commonly through pull request-driven continuous integration (CI) or build-as-a-service scenarios—can exploit this by inserting '../' sequences in the license-path to traverse directories outside the workspace. This allows reading arbitrary files on the host system. The contents of these files are then embedded into the generated Software Bill of Materials (SBOM) as license text, effectively leaking sensitive host data through build artifacts. The vulnerability requires user interaction to trigger the build process but does not require any privileges or authentication. The CVSS v3.1 base score is 5.5 (medium severity), reflecting local attack vector with low complexity, no privileges required, user interaction needed, and high confidentiality impact but no integrity or availability impact. The issue was publicly disclosed on February 4, 2026, and patched in melange version 0.40.3. No known exploits in the wild have been reported to date.
Potential Impact
For European organizations, this vulnerability poses a significant risk of sensitive data leakage from build environments, especially those employing melange in CI/CD pipelines or build-as-a-service platforms. Attackers who can submit or influence build configurations—such as external contributors in open-source projects or third-party developers—could exploit this flaw to access confidential files on build hosts, including credentials, proprietary source code, or internal documentation. The exfiltrated data embedded in SBOMs may then be inadvertently shared or exposed, increasing the risk of intellectual property theft or compliance violations under regulations like GDPR. While the vulnerability does not directly affect system integrity or availability, the confidentiality breach could lead to reputational damage, regulatory penalties, and further targeted attacks. Organizations relying on melange for package builds should consider the sensitivity of their build environments and the trustworthiness of contributors to mitigate exploitation risks.
Mitigation Recommendations
1. Upgrade melange to version 0.40.3 or later, where the path traversal vulnerability is patched. 2. Restrict who can influence melange configuration files, especially in CI/CD pipelines—limit pull request merges and build triggers to trusted users. 3. Implement strict validation and sanitization of all inputs in build configurations, particularly paths specifying license files. 4. Isolate build environments using containerization or sandboxing to limit access to host filesystem outside the workspace. 5. Monitor build artifacts and SBOM outputs for unexpected or suspicious license text content that may indicate exfiltration attempts. 6. Employ file integrity monitoring on build hosts to detect unauthorized file reads or access patterns consistent with path traversal. 7. Review and audit existing SBOMs generated by affected melange versions for embedded sensitive data and rotate any potentially exposed credentials. 8. Educate developers and CI administrators about the risks of accepting untrusted configuration inputs and enforce code review policies accordingly.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Denmark
CVE-2026-25145: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-dev melange
Description
CVE-2026-25145 is a medium severity path traversal vulnerability in chainguard-dev's melange tool versions 0. 14. 0 up to before 0. 40. 3. It allows an attacker who can influence melange configuration files—such as via pull request-driven CI or build-as-a-service environments—to read arbitrary files on the host system. The vulnerability arises from insufficient validation of license file paths in the LicensingInfos function, enabling traversal outside the intended workspace directory. The contents of these files can then be embedded into the generated SBOM, facilitating exfiltration of sensitive data through build artifacts. This issue does not require privileges but does require user interaction to trigger a build with a malicious configuration. The flaw has been patched in version 0.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-25145 is a path traversal vulnerability classified under CWE-22 found in the melange tool developed by chainguard-dev, which is used for building apk packages via declarative pipelines. Specifically, versions from 0.14.0 to before 0.40.3 contain a flaw in the LicensingInfos function located in pkg/config/config.go. This function reads license files specified in the copyright[].license-path field without properly validating that the file paths remain confined within the intended workspace directory. An attacker capable of influencing the melange configuration file—commonly through pull request-driven continuous integration (CI) or build-as-a-service scenarios—can exploit this by inserting '../' sequences in the license-path to traverse directories outside the workspace. This allows reading arbitrary files on the host system. The contents of these files are then embedded into the generated Software Bill of Materials (SBOM) as license text, effectively leaking sensitive host data through build artifacts. The vulnerability requires user interaction to trigger the build process but does not require any privileges or authentication. The CVSS v3.1 base score is 5.5 (medium severity), reflecting local attack vector with low complexity, no privileges required, user interaction needed, and high confidentiality impact but no integrity or availability impact. The issue was publicly disclosed on February 4, 2026, and patched in melange version 0.40.3. No known exploits in the wild have been reported to date.
Potential Impact
For European organizations, this vulnerability poses a significant risk of sensitive data leakage from build environments, especially those employing melange in CI/CD pipelines or build-as-a-service platforms. Attackers who can submit or influence build configurations—such as external contributors in open-source projects or third-party developers—could exploit this flaw to access confidential files on build hosts, including credentials, proprietary source code, or internal documentation. The exfiltrated data embedded in SBOMs may then be inadvertently shared or exposed, increasing the risk of intellectual property theft or compliance violations under regulations like GDPR. While the vulnerability does not directly affect system integrity or availability, the confidentiality breach could lead to reputational damage, regulatory penalties, and further targeted attacks. Organizations relying on melange for package builds should consider the sensitivity of their build environments and the trustworthiness of contributors to mitigate exploitation risks.
Mitigation Recommendations
1. Upgrade melange to version 0.40.3 or later, where the path traversal vulnerability is patched. 2. Restrict who can influence melange configuration files, especially in CI/CD pipelines—limit pull request merges and build triggers to trusted users. 3. Implement strict validation and sanitization of all inputs in build configurations, particularly paths specifying license files. 4. Isolate build environments using containerization or sandboxing to limit access to host filesystem outside the workspace. 5. Monitor build artifacts and SBOM outputs for unexpected or suspicious license text content that may indicate exfiltration attempts. 6. Employ file integrity monitoring on build hosts to detect unauthorized file reads or access patterns consistent with path traversal. 7. Review and audit existing SBOMs generated by affected melange versions for embedded sensitive data and rotate any potentially exposed credentials. 8. Educate developers and CI administrators about the risks of accepting untrusted configuration inputs and enforce code review policies accordingly.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-01-29T15:39:11.821Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6983a549f9fa50a62fa8d0ce
Added to database: 2/4/2026, 8:00:09 PM
Last enriched: 2/12/2026, 7:42:45 AM
Last updated: 3/21/2026, 9:33:01 PM
Views: 51
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.