Skip to content

Fix CVE-2025-8869: drop ensurepip's bundled pip wheel#22

Open
RoiGlinik wants to merge 1 commit into
masterfrom
fix-cve-2025-8869-ensurepip-wheel
Open

Fix CVE-2025-8869: drop ensurepip's bundled pip wheel#22
RoiGlinik wants to merge 1 commit into
masterfrom
fix-cve-2025-8869-ensurepip-wheel

Conversation

@RoiGlinik
Copy link
Copy Markdown
Contributor

Summary

  • GCP Container Analysis flags CVE-2025-8869 on the bundled pip wheel inside Alpine's python3 and python:3.11-slim (e.g. /usr/lib/python3.12/ensurepip/_bundled/pip-25.0.1-py3-none-any.whl). Upgrading pip via pip install --upgrade pip updates the live dist-info but leaves this bootstrap wheel untouched.
  • This PR adds rm -f .../ensurepip/_bundled/pip-*.whl to each affected RUN so the wheel never lands in the final image. The wheel is only used by ensurepip to bootstrap pip from scratch; we already have pip installed, so removing it is safe.
  • Bumps the affected MCP versions to trigger a rebuild.

Verification

Pushed all 8 images and queried the Container Analysis API. CVE-2025-8869 cleared on all 8.

Image Tag pip CVEs after
aws-api-mcp-server 2.0.5 0
multi-aws-api-mcp-server 2.0.5 0
azure-cli-mcp 1.0.6 0
gcloud-cli-mcp 1.0.14 3 (out-of-scope: gcloud SDK's bundled Python at /google-cloud-sdk/platform/bundledpythonunix/, pip 25.3)
gcloud-observability-mcp 1.0.5 0
gcloud-storage-mcp 1.0.5 0
kubernetes-remediation-mcp 1.0.3 0
mariadb-http-mcp-minimal 1.0.9 0

The 3 remaining pip findings on gcloud-cli-mcp are inside the gcloud SDK tarball itself (not under our control) and are not CVE-2025-8869.

Test plan

  • Each image rebuilt and pushed
  • Container Analysis API query confirms CVE-2025-8869 not present on any of the 8 images
  • Local docker scout cves agrees (no pip CVEs flagged)
  • pip --version inside each image still works (26.x); ensurepip's _bundled/ is empty

🤖 Generated with Claude Code

GCP Container Analysis (and other scanners that read file metadata) flag
CVE-2025-8869 on the bundled pip wheel that ships inside Alpine's python3
package and the python:3.11-slim image, e.g.
/usr/lib/python3.12/ensurepip/_bundled/pip-25.0.1-py3-none-any.whl.
Upgrading pip via `pip install --upgrade pip` updates the live dist-info
but leaves this bootstrap wheel untouched, so the CVE keeps showing up.

Add a `rm -f .../ensurepip/_bundled/pip-*.whl` to each affected RUN. The
wheel is only used by ensurepip to bootstrap pip; once pip is installed
we don't need it, and removing it in the same layer that put it there
keeps it out of the final image.

Verified post-push via the Container Analysis API: zero pip CVE
occurrences on all 8 images. The 3 leftover pip CVEs on gcloud-cli-mcp
come from the gcloud SDK's bundled Python (pip 25.3 inside
/google-cloud-sdk/platform/bundledpythonunix/) and are out of scope for
CVE-2025-8869.

Bumped versions:
- aws-api-mcp-server         2.0.4 -> 2.0.5
- multi-aws-api-mcp-server   2.0.4 -> 2.0.5
- azure-cli-mcp              1.0.5 -> 1.0.6
- gcloud-cli-mcp             1.0.13 -> 1.0.14
- gcloud-observability-mcp   1.0.4 -> 1.0.5
- gcloud-storage-mcp         1.0.4 -> 1.0.5
- kubernetes-remediation-mcp 1.0.2 -> 1.0.3
- mariadb-http-mcp-minimal   1.0.8 -> 1.0.9

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant