CVE-2026-24843: Chainguard.dev/melange Melange QEMU Runner Could Write Vulnerability

HIGH
Advisory Identifier: GHSA-qxx2-7h4c-83f4
CVSS 8.2
CWE-22
Published
Advisory Summary

CVE-2026-24843 is a HIGH (CVSS 8.2) melange qemu runner could write vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Chainguard.dev/melange libraries in the Go ecosystem. The issue involves melange qemu runner could write files outside workspace directory. Remediation is available by upgrading affected packages to version 0.40.3.

CVE-2026-24843 at a Glance

CVE Identifier CVE-2026-24843
GHSA Identifier GHSA-qxx2-7h4c-83f4
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Chainguard.dev/melange
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-24843

To remediate this vulnerability, upgrade all affected Chainguard.dev/melange dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

chainguard.dev/melange fixed: 0.40.3
Upgrade chainguard.dev/melange to 0.40.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for chainguard.dev/melange

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-24843, inspect your project dependencies for Chainguard.dev/melange:

inspect dependencies for chainguard.dev/melange

Analyze the terminal output to locate any version of Chainguard.dev/melange in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.40.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In Chainguard.dev/melange, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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. **Fix:** Fixed in [6e243d0d](https://github.com/chainguard-dev/melange/commit/6e243d0d46699f837d7c392397a694d2bcc7612b). Merged in release. **Acknowledgements** melange thanks Oleh Konko from [1seal](https://1seal.org/) for discovering and reporting this issue.

CVE-2026-24843 Affected Chainguard.dev/melange Versions

1 component(s)
Fixed Versions:
0.40.3
Product / Package Ecosystem Affected Versions Fixed Version
chainguard.dev/melange
Go
≥ 0.11.3
< 0.40.3
0.40.3

References

Frequently Asked Questions

What is CVE-2026-24843?
CVE-2026-24843 is a security vulnerability in Chainguard.dev/melange involving melange QEMU runner could write files outside workspace directory under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Chainguard.dev/melange versions are affected?
Affected versions include releases prior to 0.40.3 across affected packages: chainguard.dev/melange.
What version fixes CVE-2026-24843?
Upgrading to 0.40.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is chainguard.dev/melange affected?
Yes, chainguard.dev/melange is affected in releases prior to 0.40.3. Upgrade your dependency to 0.40.3 or later.
What is the CVSS score of CVE-2026-24843?
CVE-2026-24843 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:H.
What CWE is associated with CVE-2026-24843?
CVE-2026-24843 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (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.).
How can I check Go dependencies for CVE-2026-24843?
Run the dependency tree command: 'inspect dependencies for chainguard.dev/melange'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qxx2-7h4c-83f4",
  "modified" : "2026-02-04T21:55:20Z",
  "published" : "2026-02-03T23:47:29Z",
  "aliases" : [ "CVE-2026-24843" ],
  "summary" : "melange QEMU runner could write files outside workspace directory",
  "details" : "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.\n\n**Fix:** Fixed in [6e243d0d](https://github.com/chainguard-dev/melange/commit/6e243d0d46699f837d7c392397a694d2bcc7612b). Merged in release.\n\n**Acknowledgements**\n\nmelange thanks Oleh Konko from [1seal](https://1seal.org/) for discovering and reporting this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "chainguard.dev/melange"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.11.3"
      }, {
        "fixed" : "0.40.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/melange/security/advisories/GHSA-qxx2-7h4c-83f4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24843"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/chainguard-dev/melange/commit/6e243d0d46699f837d7c392397a694d2bcc7612b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/chainguard-dev/melange"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-03T23:47:29Z",
    "nvd_published_at" : "2026-02-04T20:16:05Z"
  }
}