Guides

How to keep Linux servers and containers patched and locked down: the background of each check, the fix for each finding, and what to do about well-known CVEs.

Basics

What a CVE, an SBOM or a known exploited vulnerability is, and how to read a finding.

What is a CVE? IDs, CNAs and the CVE List

What a CVE ID names, who assigns it, what a CVE record contains and what the states RESERVED, PUBLISHED and REJECTED mean.

CVSS scores explained: v3.1, v4.0 and why 9.8 is not your risk

How to read a CVSS vector, what changed in CVSS v4.0, and why the base score alone is a poor way to decide what to patch first.

What is EPSS? The exploit probability score in practice

EPSS estimates the chance that a CVE is exploited in the next 30 days. How to read score and percentile, get the data, and use it next to KEV.

CISA KEV explained: the list of known exploited vulnerabilities

What the CISA Known Exploited Vulnerabilities catalog is, how a CVE gets on it, what the fields mean and how to check your servers against it.

CWE explained: weakness types behind CVEs

CVE names one bug, CWE names the kind of mistake. How CWE IDs appear in CVE records, what the Top 25 says, and how to use them.

What is an SBOM? CycloneDX, SPDX and package URLs in practice

An SBOM lists every package in an image or on a server. How CycloneDX and SPDX differ, what a purl is, and how to make and scan an SBOM with Trivy.

CVE, GHSA, OSV, DSA, USN, RHSA: vulnerability IDs and how they relate

Why one bug has five IDs, what each prefix means, which one to use in a ticket, and how to follow aliases from a CVE to the package that fixes it.

How vulnerability scanners work, and why they disagree

A scanner lists packages, matches versions against advisory data and adds severity. Each step differs between tools, so their reports differ.

Backports and version numbers: why 9.2p1-2+deb12u3 is fixed

Debian, Ubuntu and RHEL fix old versions in place. How to read their version strings, find the fix for a CVE and spot scanner false positives.

Reading a Trivy report: columns, statuses, severity and what to do next

A walk through a real Trivy scan of an older python:3.12-slim image: what each column and JSON field means, why there are 581 findings, and which few matter.

Prioritising vulnerabilities: what to fix first on a small team

A scanner finds hundreds of CVEs. Rank them by known exploitation, exposure, available fix and EPSS, and fix most of them in bulk with regular updates.

Unfixed vulnerabilities: will_not_fix, affected, and what you can do

Many scan findings do not have a fixed version. What affected, will_not_fix and fix_deferred mean, and how to check, mitigate and record a decision.

Linux servers

SSH, updates, firewalls and the settings that the agent checks on the host.

Automatic security updates on Debian and Ubuntu with unattended-upgrades

Turn on unattended-upgrades, see what it installs and when, add reboots and other repositories, and check that it ran. Tested on Debian 12, 13, Ubuntu 24.04.

Automatic security updates on RHEL, Rocky Linux and AlmaLinux with dnf-automatic

Install dnf-automatic, apply security updates every day, reboot when needed, and check that it ran, on RHEL, Rocky Linux and AlmaLinux 8, 9 and 10.

Security updates on Alpine Linux servers: apk upgrade on a schedule

Alpine does not ship an unattended-upgrades tool. Run apk upgrade daily from crond, check pending updates, and move to a new branch before the old one ends.

When to reboot after Linux updates: needrestart, kernel updates and live patching

Which updates need a service restart or a reboot, how to find out on Debian, Ubuntu, RHEL, Rocky, Alma and Alpine, and what live patching covers.

Harden SSH on Debian, Ubuntu, RHEL, Rocky, Alma and Alpine

One sshd_config.d file for keys only, no root login and fewer tries, how sshd picks the value that counts, and how to check the result with sshd -T.

Switch SSH to key-only login without locking yourself out

Create an Ed25519 key, install it for a sudo user, test it, then turn off SSH passwords. With the fallback for each step on Debian, Ubuntu, RHEL and Alpine.

fail2ban or CrowdSec: block SSH brute force on a Linux server

When brute-force blocking matters, a tested fail2ban setup for Debian, Ubuntu, RHEL and Alpine, what CrowdSec adds, and how to unban yourself.

Set up a server firewall with ufw, firewalld or nftables

A default-deny firewall for Debian, Ubuntu, RHEL, Rocky, Alma and Alpine: ufw, firewalld or a plain nftables ruleset, with a safe way to apply it.

Find open ports on a Linux server with ss -tulpn

List the services that listen on a server, read the addresses, find the owning package, check from outside, and close what should not be public.

sudo and user accounts on a Linux server: who can become root

One account per person, sudo rights through a group, NOPASSWD only where it fits, no second UID 0, no empty passwords, and how to lock someone out cleanly.

Linux kernel hardening with sysctl: the settings that matter on a server

kptr_restrict, dmesg_restrict, unprivileged BPF, protected links: what they do, the defaults per distribution, and a sysctl.d file to set them.

End-of-life dates of Linux releases: Debian, Ubuntu, RHEL, Rocky, Alma, Alpine

Until when Debian, Ubuntu, RHEL, Rocky Linux, AlmaLinux, Alpine and Amazon Linux releases get security updates, as of November 2026, with sources.

Containers

Images, Docker settings and how to keep containers up to date.

Docker bypasses ufw: why published ports stay open and how to close them

Ports published with docker run -p or compose are reachable even when ufw denies them. Bind them to 127.0.0.1, or filter in the DOCKER-USER chain.

Keep Docker images updated: tags, digests, rebuilds and Renovate

apt upgrade on the host does not touch your containers. Pin image versions, rebuild with --pull on a schedule, and let Renovate or Dependabot propose bumps.

Choosing a Docker base image: Debian slim, Alpine, distroless or scratch

What the common base images contain, how many packages a scanner finds in each, musl versus glibc, support periods, and which one fits which application.

Docker socket security: docker.sock mounts, the docker group and the TCP API

Access to /var/run/docker.sock or the Docker API on TCP equals root on the host. Find who has it and replace it with SSH, a filtering proxy or rootless Docker.

Run Docker containers as a non-root user

Containers run as root unless the image or you say otherwise. Set USER in the Dockerfile or user: in compose, check what runs, and when to use userns-remap.

Privileged containers and Linux capabilities in Docker

What --privileged, --cap-add, --pid=host and --network=host give a container, how to find them on a host, and the narrower options that replace them.

Scan Docker images in CI with Trivy or Grype (GitHub Actions and GitLab CI)

Fail the build on fixable critical and high vulnerabilities, with Trivy or Grype in GitHub Actions and GitLab CI, actions pinned by commit SHA.

Process

How to handle a finding, plan updates and keep a server patched over time.

Famous CVEs

Well-known vulnerabilities: what happened, who was affected and how to check a server.

Log4Shell (CVE-2021-44228): what happened and how to check for it today

How a logged string led to remote code execution in Java apps, the follow-up CVEs, how to find log4j-core on a server and in images, and what to learn.

The xz-utils backdoor (CVE-2024-3094): how it worked and how to check

A maintainer account slipped a backdoor into xz 5.6.0 and 5.6.1 aimed at sshd. Who got the bad versions, how to check a server, and what it teaches.

regreSSHion (CVE-2024-6387): the OpenSSH race condition

A signal handler race in sshd let unauthenticated attackers run code as root on glibc Linux. Affected versions, how to check, the LoginGraceTime mitigation.

Heartbleed (CVE-2014-0160): the OpenSSL memory leak

A missing length check in the TLS heartbeat let anyone read server memory, private keys included. How it worked, how to check old systems, what to learn.

Shellshock (CVE-2014-6271 and follow-ups): bash runs code from environment variables

How a function definition in an environment variable let attackers run commands through CGI scripts, SSH and DHCP, the six CVEs, and how to test bash today.

PwnKit (CVE-2021-4034): root from any account through pkexec

A twelve-year-old bug in the setuid program pkexec gave root to any local user on most Linux distributions. How it worked, how to check, the chmod mitigation.

Dirty Pipe (CVE-2022-0847): overwriting read-only files on Linux 5.8+

An uninitialised flag in the kernel pipe code let any user overwrite read-only files in the page cache. Affected kernels, how to check, why reboots matter.

HTTP/2 Rapid Reset (CVE-2023-44487): the stream cancellation DDoS

Clients that open and cancel HTTP/2 streams at once broke DDoS records in 2023. How the attack works, which servers needed updates, and how to check yours.

Looney Tunables (CVE-2023-4911): root through the glibc loader

A buffer overflow in how ld.so parses GLIBC_TUNABLES gave local users root through setuid programs on Debian, Ubuntu and Fedora. How to test and fix it.