Skip to content

Base images and OS vulnerabilities

Every container image is built on top of another one: the base image, named in the FROM line of the Dockerfile. It usually brings a Linux distribution and dozens or hundreds of operating system packages that your application never asked for.

FROM node:22 # base image: Debian + Node.js + hundreds of OS packages
COPY . /app # your application and its dependencies
Operating system Application
Comes from The base image (openssl, glibc, zlib…) Your dependencies (npm, Maven, NuGet, PyPI, Go…)
Fixed by Updating or changing the base image Updating the package in the application
Usually owned by Platform team Application team

Telling them apart matters: a report that mixes both sends every finding to the application team, which can’t fix most of them.

  • It is often the largest source of vulnerabilities in an image, sometimes by far.
  • Many applications share the same base: one outdated base image puts all of them at risk, and one update fixes all of them.
  • Images that are not rebuilt keep the old base forever, even after a fixed version exists.
  • Prefer small base images (slim, distroless or hardened images): fewer packages, fewer vulnerabilities.
  • Pin the base image to a version, and update it on purpose.
  • Rebuild regularly, so fixes in the base reach your images.
  • Use multi-stage builds, so compilers and build tools don’t end up in the final image.

Dockerfile finds the base image of every pipeline and scans it, and Repositories lets you filter findings by origin: application or operating system.