Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-25145: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in chainguard-dev melange

0
Medium
VulnerabilityCVE-2026-25145cvecve-2026-25145cwe-22
Published: Wed Feb 04 2026 (02/04/2026, 19:32:35 UTC)
Source: CVE Database V5
Vendor/Project: chainguard-dev
Product: 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. This is achieved through improper validation of license file paths in the LicensingInfos function, enabling directory traversal via '.. /' sequences. The attacker can exfiltrate sensitive data by embedding file contents into the generated SBOM license text. The vulnerability requires local access to modify configuration files and user interaction to trigger the build process.

AI-Powered Analysis

AILast updated: 02/04/2026, 20:16:06 UTC

Technical Analysis

The vulnerability CVE-2026-25145 affects chainguard-dev's melange, a tool used to build apk packages via declarative pipelines. Between versions 0.14.0 and before 0.40.3, melange's LicensingInfos function in pkg/config/config.go improperly validates paths specified in copyright[].license-path. Specifically, it does not restrict pathname traversal sequences such as '../', allowing attackers to escape the intended workspace directory. An attacker capable of influencing melange configuration files—common in CI/CD environments where builds are triggered by pull requests or external inputs—can specify license paths that point to arbitrary files on the host system. When melange reads these files to embed license information into the Software Bill of Materials (SBOM), it inadvertently includes the contents of sensitive files. This creates a covert channel for exfiltrating confidential data through build artifacts. The vulnerability requires no privileges (PR:N) but does require user interaction (UI:R) to trigger the build process. The attack vector is local (AV:L), meaning the attacker must have the ability to modify configuration files or influence the build environment. The vulnerability impacts confidentiality (C:H) but does not affect integrity or availability. No known exploits are reported in the wild, and the issue was patched in version 0.40.3.

Potential Impact

For European organizations, this vulnerability poses a significant confidentiality risk in environments that use melange for package building, especially in CI/CD pipelines that accept external contributions or run build-as-a-service models. Sensitive files on build hosts, such as credentials, configuration files, or proprietary source code, could be exposed through manipulated SBOM license fields. This could lead to intellectual property theft, leakage of personal data subject to GDPR, or exposure of internal infrastructure details. Since the vulnerability requires the ability to influence configuration files, organizations with open or semi-open build environments are at higher risk. The impact is heightened in sectors with strict data protection requirements, such as finance, healthcare, and government. However, the lack of integrity or availability impact limits the scope to data confidentiality breaches. The medium CVSS score reflects the moderate ease of exploitation combined with the significant confidentiality impact.

Mitigation Recommendations

European organizations should immediately upgrade melange to version 0.40.3 or later where the vulnerability is patched. For environments where immediate upgrade is not feasible, implement strict validation and sanitization of all inputs influencing melange configuration files, particularly license-path entries. Restrict write access to configuration files to trusted users and processes only, minimizing the risk of unauthorized modifications. Employ build isolation techniques such as containerization or sandboxing to limit the scope of file system access during builds. Monitor build artifacts and SBOM outputs for unexpected license text content that could indicate exploitation attempts. Additionally, enforce strict code review and CI pipeline security controls to prevent untrusted code or configuration changes from being merged or executed. Finally, consider implementing file system access controls or mandatory access control (MAC) policies to prevent unauthorized file reads by build processes.

Need more detailed analysis?Upgrade to Pro Console

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/4/2026, 8:16:06 PM

Last updated: 2/5/2026, 1:20:04 AM

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats