diff --git a/Dockerfile b/Dockerfile index 4bfda93911..717ec2bcb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ ARG LITELLM_BUILD_IMAGE=cgr.dev/chainguard/wolfi-base # Runtime image ARG LITELLM_RUNTIME_IMAGE=cgr.dev/chainguard/wolfi-base + # Builder stage FROM $LITELLM_BUILD_IMAGE AS builder @@ -62,6 +63,10 @@ COPY --from=builder /wheels/ /wheels/ # Install the built wheel using pip; again using a wildcard if it's the only file RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels +# Replace the nodejs-wheel-binaries bundled node with the system node (fixes CVE-2025-55130) +RUN NODEJS_WHEEL_NODE=$(find /usr/lib -path "*/nodejs_wheel/bin/node" 2>/dev/null) && \ + if [ -n "$NODEJS_WHEEL_NODE" ]; then cp /usr/bin/node "$NODEJS_WHEEL_NODE"; fi + # Remove test files and keys from dependencies RUN find /usr/lib -type f -path "*/tornado/test/*" -delete && \ find /usr/lib -type d -path "*/tornado/test" -delete diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database index 24bf706434..ecbe76446f 100644 --- a/docker/Dockerfile.database +++ b/docker/Dockerfile.database @@ -64,6 +64,10 @@ COPY --from=builder /wheels/ /wheels/ # Install the built wheel using pip; again using a wildcard if it's the only file RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels +# Replace the nodejs-wheel-binaries bundled node with the system node (fixes CVE-2025-55130) +RUN NODEJS_WHEEL_NODE=$(find /usr/lib -path "*/nodejs_wheel/bin/node" 2>/dev/null) && \ + if [ -n "$NODEJS_WHEEL_NODE" ]; then cp /usr/bin/node "$NODEJS_WHEEL_NODE"; fi + # Install semantic_router and aurelio-sdk using script # Convert Windows line endings to Unix and make executable RUN sed -i 's/\r$//' docker/install_auto_router.sh && chmod +x docker/install_auto_router.sh && ./docker/install_auto_router.sh diff --git a/docker/Dockerfile.non_root b/docker/Dockerfile.non_root index 3ef47607fc..4b09755ed7 100644 --- a/docker/Dockerfile.non_root +++ b/docker/Dockerfile.non_root @@ -146,6 +146,10 @@ RUN pip install --no-index --find-links=/wheels/ -r requirements.txt && \ fi; \ fi +# Replace the nodejs-wheel-binaries bundled node with the system node (fixes CVE-2025-55130) +RUN NODEJS_WHEEL_NODE=$(find /usr/lib -path "*/nodejs_wheel/bin/node" 2>/dev/null) && \ + if [ -n "$NODEJS_WHEEL_NODE" ]; then cp /usr/bin/node "$NODEJS_WHEEL_NODE"; fi + # Permissions, cleanup, and Prisma prep # Convert Windows line endings to Unix for entrypoint scripts RUN sed -i 's/\r$//' docker/entrypoint.sh && \