GHSA-PHHQ-63JG-FP7R

Vulnerability from github – Published: 2025-07-09 17:56 – Updated: 2025-07-09 17:56
VLAI
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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/edgelesssys/contrast"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.9.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-552",
      "CWE-693"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-07-09T17:56:24Z",
    "nvd_published_at": null,
    "severity": "LOW"
  },
  "details": "### Background\n\nThe [`VOLUME`](https://docs.docker.com/reference/dockerfile/#volume) directive in Dockerfiles, or the [`config.volumes`](https://github.com/opencontainers/image-spec/blob/06e6b47e2ef69021d9f9bf2cfa5fe43a7e010c81/config.md?plain=1#L168-L170) 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](https://github.com/opencontainers/image-spec/blob/06e6b47e2ef69021d9f9bf2cfa5fe43a7e010c81/conversion.md?plain=1#L100-L105) and adds a mount point if there is none set by Kubernetes.\n\nUnfortunately, 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:\n\n1. A declared `VOLUME` location is usually important to the app\u0027s core functionality, which is usually at odds with the data in that location being untrusted.\n2. `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.\n\n### Impact\n\nAll of the following need to be true to be affected by this vulnerability:\n\n1. A bare metal Contrast deployment (AKS is not affected).\n2. An image with at least one VOLUME directive.\n3. No Kubernetes mount at the path of the VOLUME.\n\nIf these are all true, the host is able to write arbitrary trees below that mount point.\n\n### Patches\n\nPatched in v1.9.1 by disallowing this configuration in `contrast generate`.\n\n### Workarounds\n\nExplicitly 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.",
  "id": "GHSA-phhq-63jg-fp7r",
  "modified": "2025-07-09T17:56:24Z",
  "published": "2025-07-09T17:56:24Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/edgelesssys/contrast/security/advisories/GHSA-phhq-63jg-fp7r"
    },
    {
      "type": "WEB",
      "url": "https://github.com/edgelesssys/contrast/commit/635b471ddbb512b6661e6f1d767aab818bd50bda"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/edgelesssys/contrast"
    },
    {
      "type": "WEB",
      "url": "https://github.com/edgelesssys/contrast/releases/tag/v1.9.1"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Contrast vulnerability allows arbitrary host data Injection into container VOLUME mount points"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…