OCImendby CloudTrace

How to fix CVEs in Debian container images

Short answer

Debian-based images are fixed by apt-get upgrade from the security repository of a supported release. Many reported Debian CVEs have no fix because the Debian security team rated them minor or postponed them; those are reported as no fix yet, not as something an upgrade can change. Use the slim variant and a supported release.

Fix a Debian image now → free, no sign-up; pre-filled with debian:12-slim, change it to yours

The steps

  1. 01apt-get upgradeFixes from the security repository of your release.
  2. 02Slim variantFewer packages, fewer CVEs.
  3. 03Supported releaseOld releases move to the archive and stop receiving fixes.
  4. 04Read 'no fix' correctlyPostponed or minor issues have no fixed package to upgrade to.

By hand

FROM debian:12-slim
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*

Then rescan: the CVEs that remain are either without a released fix or in code the application never loads (the report marks both).

Traps that bring CVEs back

Debian images in OCImend's reports

Questions

How do I fix CVEs in a Debian container image?
Debian-based images are fixed by apt-get upgrade from the security repository of a supported release. Many reported Debian CVEs have no fix because the Debian security team rated them minor or postponed them; those are reported as no fix yet, not as something an upgrade can change. Use the slim variant and a supported release.
Why does Debian show so many CVEs with no fix?
The security team publishes fixes for issues it rates important; minor ones are postponed. They remain listed until fixed upstream.
Is debian:12-slim enough for production?
For most apps yes, once patched.

Other image types

Python · Node.js · Java · Go · nginx · PostgreSQL · Alpine · Ubuntu · Red Hat UBI

Fix a Debian image now →