Guides / Basics

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

beginnerUpdated 26 Nov 2026982 words

Trivy is a free scanner from Aqua Security for container images, file systems and SBOMs. Below is a scan of python:3.12.8-slim, an image built on Debian 12.9 that has not been updated since, with each part of the output explained.

Running the scan

trivy image --scanners vuln python:3.12.8-slim                 # an image
trivy fs --scanners vuln /srv/app                              # a directory with lockfiles
sudo trivy rootfs --scanners vuln /                            # the running host
trivy image --scanners vuln --format json -o report.json python:3.12.8-slim

--scanners vuln skips the secret scan, which is slow on large images. The example was made with Trivy 0.75.0 on 2026-11-26, on the file system of the image; trivy image gives the same findings with the image name as the target.

The summary

The summary table lists what Trivy scanned:

┌──────────────────────────────────────────────────────────────────────┬────────────┬─────────────────┐
│                                Target                                │    Type    │ Vulnerabilities │
├──────────────────────────────────────────────────────────────────────┼────────────┼─────────────────┤
│ 79af7a5022c7 (debian 12.9)                                           │   debian   │       52        │
├──────────────────────────────────────────────────────────────────────┼────────────┼─────────────────┤
│ usr/local/lib/python3.12/site-packages/pip-24.3.1.dist-info/METADATA │ python-pkg │        0        │
└──────────────────────────────────────────────────────────────────────┴────────────┴─────────────────┘

Each target is one source of packages: the Debian package database, and the metadata of each Python package. The counts depend on the filters; this table was made with --severity HIGH,CRITICAL --ignore-unfixed.

Without filters the scan found 581 vulnerabilities: 575 in 105 Debian packages, 6 in pip.

Severity Count
CRITICAL 9
HIGH 145
MEDIUM 237
LOW 165
UNKNOWN 25
Status Count
fixed 199
affected 300
fix_deferred 68
will_not_fix 14

The table

Two rows, with the titles shortened:

│ Library  │ Vulnerability  │ Severity │ Status       │ Installed Version │ Fixed Version    │ Title                             │
│ libssl3  │ CVE-2026-31789 │ CRITICAL │ fixed        │ 3.0.15-1~deb12u1  │ 3.0.19-1~deb12u2 │ openssl: OpenSSL: Heap buffer ... │
│ zlib1g   │ CVE-2023-45853 │ CRITICAL │ will_not_fix │ 1:1.2.13.dfsg-1   │                  │ zlib: integer overflow and ...    │
Column Meaning
Library The installed package; for OS packages, the binary package name. One fix often shows up several times: CVE-2026-31789 appears for both libssl3 and openssl, two binary packages built from the same source.
Vulnerability The CVE ID, or a GHSA or distribution ID when there is no CVE.
Severity From the data source Trivy matched (the distribution for OS packages, GHSA for Python packages), or from the NVD and other vendors when that source does not rate it. UNKNOWN means nobody has rated it yet.
Status fixed: a fixed version exists. affected: the distribution knows the package is affected and has not released a fix. will_not_fix and fix_deferred are decisions of the distribution; see unfixed vulnerabilities.
Installed Version, Fixed Version In the version scheme of the distribution. Compare them with dpkg --compare-versions instead of by eye; see backports and version numbers.
Title A short description and a link with details.

Fields of the JSON report

The JSON report has more fields per finding:

jq '.Results[0].Vulnerabilities[] | select(.VulnerabilityID == "CVE-2023-45853")
    | {PkgName, InstalledVersion, Status, Severity, SeveritySource, VendorSeverity, DataSource}' report.json
{
  "PkgName": "zlib1g",
  "InstalledVersion": "1:1.2.13.dfsg-1",
  "Status": "will_not_fix",
  "Severity": "CRITICAL",
  "SeveritySource": "nvd",
  "VendorSeverity": { "amazon": 2, "azure": 3, "cbl-mariner": 4, "ghsa": 4, "julia": 4,
                      "nvd": 4, "photon": 4, "redhat": 2, "ubuntu": 2 },
  "DataSource": { "ID": "debian", "Name": "Debian Security Tracker" }
}

VendorSeverity uses numbers: 1 low, 2 medium, 3 high, 4 critical. This finding is CRITICAL because Debian does not give it a severity and Trivy fell back to the NVD; Red Hat and Ubuntu rate it medium. The Debian tracker says why it stays unfixed: the vulnerable MiniZip code is in the zlib source, but Debian does not build it into the zlib1g package. On this system the CRITICAL finding is not exploitable.

Findings in language packages also carry PkgPath, the file Trivy found the package in.

jq recipes

Counts by severity and status:

jq -r '[.Results[].Vulnerabilities[]?] | group_by(.Severity) | map("\(.[0].Severity) \(length)") | .[]' report.json
jq -r '[.Results[].Vulnerabilities[]?] | group_by(.Status) | map("\(.[0].Status) \(length)") | .[]' report.json

The OS packages that have a fix, ready for apt-get install --only-upgrade:

jq -r '.Results[] | select(.Class == "os-pkgs") | .Vulnerabilities[]?
       | select(.Status == "fixed") | .PkgName' report.json | sort -u

For this image that is 30 packages. Critical and high findings with a fix, one line each:

jq -r '.Results[].Vulnerabilities[]? | select(.Status == "fixed" and (.Severity == "CRITICAL" or .Severity == "HIGH"))
       | "\(.PkgName) \(.InstalledVersion) -> \(.FixedVersion)"' report.json | sort -u

For matches with the CISA KEV list, see CISA KEV explained. This image had none.

What the report does not show

The Python interpreter in this image was compiled from source into /usr/local. It is not a Debian package and does not have Python package metadata, so Trivy 0.75.0 did not list it, and CVEs fixed in later Python releases do not appear. Check software you build or copy in yourself in another way; how scanners work lists other blind spots.

What to do with this report

  1. Rebuild on an updated base image. Debian has shipped fixes for the 199 findings with status fixed; a rebuild on a current base image, or apt-get upgrade during the build, installs them.
  2. Read the distribution tracker for each remaining critical or high finding with status affected. Many concern code paths that a container never reaches.
  3. Leave the rest to regular rebuilds, and track the totals over time instead of each line.

Sources

Check your servers every day

The Vulnpocalypse collector reports the packages and settings of a server once a day, and the digest lists what to fix, most urgent first.

Start free