EngineeringApril 24, 2026·2 min read

Container Security in 2026: What Your Docker Image Is Hiding

Most of the known vulnerabilities in a typical container image are not in the application. They are in the base image, inherited from an operating system layer that the application never touches directly but that an attacker who gets code execution will.

Layer 1: Base image CVEs

When you write FROM node:22-alpine, you inherit every package in that Alpine release: OpenSSL, zlib, busybox and the rest. Whatever CVEs are open against those packages on the day you build are now in your image. These are not your dependencies and you did not choose them, but they run in your production container.

The right approach is to know exactly what is in your base image, which CVEs are present, and which of them have fixes available. Rebuild regularly so that fixes published upstream reach your image, and pin the base image by digest so that a rebuild is a decision and not an accident.

Layer 2: Dockerfile misconfigurations

A Dockerfile that runs the application as root, exposes unnecessary ports, copies secrets into an image layer, or disables security features makes an attacker's job easier. These are not CVEs and will not appear in a vulnerability database. They are configuration decisions.

Common examples: no USER instruction, so the container runs as root and any code execution flaw gives the attacker root inside it; and COPY .env /app/.env, which bakes secrets into an image layer where anyone who can pull the image can read them with docker history.

Layer 3: Runtime privilege escalation

Even a well-built container can be run with excessive privileges. The --privileged flag, host network mode, writable hostPath mounts and missing seccomp profiles all create paths from a compromised container to the host. These settings live in your orchestration manifests and not in the image, so an image scan will not see them. Review them where they are defined.

Spoorder's Crate (Container) scanner, available on Pro and above, checks a Dockerfile for security misconfigurations and reports known CVEs in image packages with the fixed version where one exists. If the image scanner is unavailable for a run, the result is marked Partial and not clean.

Ready to scan your application?

Free health check: HTTPS, TLS and security headers for one URL, in about a minute. Free account, no credit card.

Scan your app free →
← Back to blog