GHSA-phhq-63jg-fp7r

Suggest an improvement
Source
https://github.com/advisories/GHSA-phhq-63jg-fp7r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/07/GHSA-phhq-63jg-fp7r/GHSA-phhq-63jg-fp7r.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-phhq-63jg-fp7r
Published
2025-07-09T17:56:24Z
Modified
2025-07-09T17:56:24Z
Severity
  • 3.5 (Low) CVSS_V3 - CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
Contrast vulnerability allows arbitrary host data Injection into container VOLUME mount points
Details

Background

The VOLUME directive in Dockerfiles, or the config.volumes field in OCI image descriptors, indicates filesystem paths "where the process is likely to write data". While these paths have special semantics in Docker, they are only hints in the OCI spec and are not treated specially by Kubernetes. However, containered implements the specified conversion logic and adds a mount point if there is none set by Kubernetes.

Unfortunately, the specification leaves it open whether the mount point is populated with any and what data, so the runtime needs to be able to push arbitrary data to the Kata agent. However, this is almost always not what the user wants:

  1. A declared VOLUME location is usually important to the app's core functionality, which is usually at odds with the data in that location being untrusted.
  2. VOLUME declarations are often used by image vendors to indicate "mount your persistence here" to the user. They are rarely useful without a real volume mounted there.

Impact

All of the following need to be true to be affected by this vulnerability:

  1. A bare metal Contrast deployment (AKS is not affected).
  2. An image with at least one VOLUME directive.
  3. No Kubernetes mount at the path of the VOLUME.

If these are all true, the host is able to write arbitrary trees below that mount point.

Patches

Patched in v1.9.1 by disallowing this configuration in contrast generate.

Workarounds

Explicitly mount an emptyDir to all VOLUME locations. If the initial data in these locations is needed by the application, the image needs to be modified to remove the config.volumes entries.

Database specific
{
    "github_reviewed": true,
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-552",
        "CWE-693"
    ],
    "github_reviewed_at": "2025-07-09T17:56:24Z",
    "severity": "LOW"
}
References

Affected packages

Go / github.com/edgelesssys/contrast

Package

Name
github.com/edgelesssys/contrast
View open source insights on deps.dev
Purl
pkg:golang/github.com/edgelesssys/contrast

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.1