CVE-2026-24843
Unknown Unknown - Not Provided
Path Traversal in Melange Tar Extraction Allows Host File Write

Publication date: 2026-02-04

Last updated on: 2026-02-18

Assigner: GitHub, Inc.

Description
melange allows users to build apk packages using declarative pipelines. In version 0.11.3 to before 0.40.3, an attacker who can influence the tar stream from a QEMU guest VM could write files outside the intended workspace directory on the host. The retrieveWorkspace function extracts tar entries without validating that paths stay within the workspace, allowing path traversal via ../ sequences. This issue has been patched in version 0.40.3.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-04
Last Modified
2026-02-18
Generated
2026-05-27
AI Q&A
2026-02-04
EPSS Evaluated
2026-05-25
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
chainguard melange From 0.11.3 (inc) to 0.40.5 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 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.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

[{'type': 'paragraph', 'content': "CVE-2026-24843 is a path traversal vulnerability in the Melange project affecting versions 0.11.3 to before 0.40.3. It occurs in the retrieveWorkspace function, which extracts tar archive entries from a QEMU guest VM into a build workspace on the host. The function does not properly validate that file paths remain within the intended workspace directory, allowing an attacker who can influence the tar stream to craft malicious tar entries containing '../' sequences or absolute paths. This enables writing files outside the workspace directory on the host, potentially overwriting critical system files."}, {'type': 'paragraph', 'content': 'The vulnerability allows an attacker to escape the intended sandbox and write arbitrary files on the host system by exploiting improper path validation during tar extraction. The issue was patched in version 0.40.3 by introducing strict path validation that rejects absolute paths, null bytes, and ensures normalized paths do not escape the workspace directory.'}] [1, 2]


How can this vulnerability impact me? :

This vulnerability can have serious impacts if exploited. An attacker able to influence the tar stream from a QEMU guest VM can write files outside the intended workspace directory on the host system. This can lead to unauthorized modification of critical system files such as /usr/bin/curl or /etc configuration files.

If combined with privileged container execution, the vulnerability could allow an attacker to escape the container or VM sandbox and gain broader access to the host system, escalating the severity to critical.

The impacts include high integrity and availability risks due to unauthorized file modifications and potential disruption or compromise of the host environment.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': "This vulnerability involves path traversal in tar archive extraction within the Melange QEMU runner. Detection involves inspecting tar archives extracted by Melange for malicious path entries containing '../' sequences or absolute paths that escape the intended workspace directory."}, {'type': 'paragraph', 'content': 'You can manually inspect tar files used in your build pipelines for suspicious entries by listing their contents and checking for path traversal patterns.'}, {'type': 'list_item', 'content': "Use the command `tar -tf archive.tar` to list the contents of a tar archive and look for entries with '../' or absolute paths."}, {'type': 'list_item', 'content': "Use `tar -tf archive.tar | grep '\\.\\./'` to filter entries containing path traversal sequences."}, {'type': 'list_item', 'content': 'Check Melange versions in use to identify if they are vulnerable (versions from 0.11.3 up to before 0.40.3).'}, {'type': 'paragraph', 'content': 'Since the vulnerability requires influence over the tar stream from a QEMU guest VM, monitoring logs or audit trails for unexpected file writes outside the workspace directory on the host may also help detect exploitation attempts.'}] [1, 2]


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation is to upgrade Melange to version 0.40.3 or later, where the vulnerability has been patched by adding strict path validation on all tar entries and link targets.

If upgrading immediately is not possible, restrict or disable the ability of untrusted users or VMs to influence tar streams processed by Melange.

  • Apply the patch from commit 6e243d0d46699f837d7c392397a694d2bcc7612b which implements comprehensive path validation.
  • Ensure that Melange runs with the least privileges necessary to limit the impact of any potential exploitation.

Monitor your systems for unusual file writes outside expected directories and audit build pipelines for suspicious tar archive contents.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart