Fix CVE-2025-8869: drop ensurepip's bundled pip wheel#22
Open
RoiGlinik wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python3andpython:3.11-slim(e.g./usr/lib/python3.12/ensurepip/_bundled/pip-25.0.1-py3-none-any.whl). Upgrading pip viapip install --upgrade pipupdates the live dist-info but leaves this bootstrap wheel untouched.rm -f .../ensurepip/_bundled/pip-*.whlto each affectedRUNso 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.Verification
Pushed all 8 images and queried the Container Analysis API. CVE-2025-8869 cleared on all 8.
/google-cloud-sdk/platform/bundledpythonunix/, pip 25.3)The 3 remaining pip findings on
gcloud-cli-mcpare inside the gcloud SDK tarball itself (not under our control) and are not CVE-2025-8869.Test plan
docker scout cvesagrees (no pip CVEs flagged)pip --versioninside each image still works (26.x); ensurepip's_bundled/is empty🤖 Generated with Claude Code