Sub topic 2
CVEs, severity and fixed versions
This chapter explains how to read the three pieces of data that every scanner finding carries: the CVE identifier, the severity rating, and the fixed version. It assumes you can pull and build images, and that you know an image holds packages installed by a package manager (apt, apk, pip, npm). The next chapters use these terms constantly, so it is worth getting them exact.
What a CVE is
A CVE (Common Vulnerabilities and Exposures) entry is a public identifier for one specific security flaw in one specific piece of software. The identifier has the form CVE-YEAR-NUMBER, for example CVE-2024-12345. The year is when the ID was reserved or assigned, not necessarily when the bug was introduced or fixed. The number has at least four digits.
CVE IDs are assigned by CVE Numbering Authorities (CNAs). These are vendors, open-source projects and research organizations authorized to hand out IDs. A CVE record is short. It holds an ID, a description, the affected products and versions, and references to advisories.
A CVE does not tell you whether the flaw is exploitable in your container. It only says the flaw exists in some versions of some software. Whether you are affected depends on whether that software is in your image, in an affected version, and used in a way that reaches the bug.
Other identifiers you will see
Scanners combine several advisory sources, so a finding may carry a different ID or list several.
| Prefix | Source | Typical scope |
|---|---|---|
| `CVE-` | MITRE/CVE program | Any software |
| `GHSA-` | GitHub Advisory Database | Language packages (npm, PyPI, Go, and others) |
| `GO-` | Go vulnerability database | Go modules |
| `DSA-` / `DLA-` | Debian security announcements | Debian packages |
| `USN-` | Ubuntu security notices | Ubuntu packages |
| `RHSA-` | Red Hat security advisories | Red Hat packages |
One flaw often has several IDs. A GitHub advisory usually lists a CVE as an alias. When two scanners show different IDs for what looks like the same problem, check the aliases before concluding they disagree.
Where severity comes from
Severity is a rating of how serious a flaw is. It is not part of the CVE record itself. Several parties add it, and they can disagree.
CVSS
The Common Vulnerability Scoring System (CVSS) produces a number from 0.0 to 10.0. It is calculated from properties such as how the attacker reaches the target (network or local), how complex the attack is, whether privileges are needed, and the impact on confidentiality, integrity and availability. CVSS v3.x maps scores to named ratings:
| Score | Rating |
|---|---|
| 0.0 | None |
| 0.1 to 3.9 | Low |
| 4.0 to 6.9 | Medium |
| 7.0 to 8.9 | High |
| 9.0 to 10.0 | Critical |
The National Vulnerability Database (NVD), run by NIST, adds CVSS scores to many CVEs. CVSS v4.0 also exists, so you may see v2, v3 and v4 scores in the same report.
Vendor ratings
Linux distributions assess flaws in their own packages. A Debian maintainer knows whether the vulnerable code path is compiled into the Debian build and whether Debian ships it in a default configuration. So Debian, Ubuntu, Red Hat and Alpine publish their own severities, and these can differ from the NVD score. For example, a flaw might score 9.8 in NVD, yet the distro rates it low because the affected feature is disabled in its build.
Both tools take this into account. Trivy prefers the vendor's severity when the data source provides one, and falls back to other sources such as NVD. Docker Scout also aggregates several advisory sources. Consequently, the same CVE can show a different severity in two tools, or in two images based on different distributions.
The labels each tool prints
| Tool | Labels | Notes |
|---|---|---|
| Trivy | `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`, `UNKNOWN` | `UNKNOWN` means no source gave a rating. |
| Docker Scout | critical, high, medium, low, unspecified | `unspecified` means no rating is available. |
Filtering by severity is covered in later chapters, but note one consequence now. If you filter to critical and high only, findings with unknown or unspecified severity disappear from the report. For a first scan of an unfamiliar image, look at those findings at least once.
Severity is not risk
A severity rating describes the flaw in the abstract. Risk depends on your situation. Questions that change the picture:
- Is the vulnerable package loaded by the process your container actually runs? A flaw in a shell utility that your service never calls carries little risk.
- Does the attack need network access to a port you do not expose?
- Does the attack need local access or a privileged user, which an attacker would already need to hold to do more damage?
- Is a working exploit known? Some CVE data sources flag this, such as the CISA Known Exploited Vulnerabilities catalog and EPSS scores. Docker Scout can show this kind of context, and Trivy can show it in some output formats.
Treat the scanner's severity as a way to order your work. It does not give a final decision. The triage chapter returns to this.
Fixed versions
The most actionable field in a finding is the fixed version. It is the first version of the package that contains a patch for the flaw. The scanner compares it with the version installed in your image.
{
"VulnerabilityID": "CVE-2024-00000",
"PkgName": "libexample1",
"InstalledVersion": "1.2.3-1",
"FixedVersion": "1.2.3-1+deb12u1",
"Status": "fixed",
"Severity": "HIGH"
}This is the shape of one finding in Trivy's JSON output. The values are placeholders. Four fields matter:
PkgNameandInstalledVersionidentify what is in your image.FixedVersionnames the version that resolves the finding. Upgrading to that version or later removes the finding.Statussays where the fix stands.
Why distro versions look odd
Distributions often backport fixes. Instead of moving to the newest upstream release, which could break other things, the maintainers copy the security patch into the version they already ship and change only the packaging suffix. That is why a Debian fixed version looks like 1.2.3-1+deb12u1. The upstream version is still 1.2.3, but the package is patched.
This has a practical consequence. You cannot judge a package by its upstream version number alone. A package labeled 1.2.3 may be vulnerable in one build and patched in another. Scanners avoid this mistake by using each distribution's own advisory data and its own version-comparison rules. Treat the scanner's verdict as more reliable than a manual look at version numbers.
Status values
A package with no fixed version is not always unfixable. The status tells you why. Trivy reports values such as these:
| Status | Meaning |
|---|---|
| `fixed` | A patched version exists. Upgrade to it. |
| `affected` | The package is vulnerable and no fix has been published yet. |
| `under_investigation` | The vendor has not yet decided. |
| `will_not_fix` | The vendor has decided not to patch, often because the impact is minor. |
| `fix_deferred` | A fix is planned for a later update. |
| `end_of_life` | The release is no longer supported, so no fix will arrive. |
Docker Scout shows the fixed version in its own listing and lets you filter to findings that have one.
Why fix availability drives workflow
Findings with a fixed version are actionable. You rebuild with updated packages or a newer base image, and the finding goes away. Findings without a fixed version are not actionable by upgrading. Your options are to choose a different base image that does not ship the package, to remove the package, to mitigate in configuration, or to accept the risk with a record of why.
For that reason, both tools can hide unfixed findings. Trivy has --ignore-unfixed, and Docker Scout has --only-fixed. Hiding them is useful for CI gates, where you want a failing build only when you can do something about it. It is risky as a default for reviews, because it hides flaws that are real and could matter.
From advisory to finding
A finding appears only after several steps, and a delay at any step affects what your scanner shows.
Two practical points follow from this flow:
- The scanner's database must be current. Trivy downloads its database and refreshes it when it is out of date. Docker Scout uses a service-side database. A stale database misses new CVEs, so an old scan result tells you little about today's exposure.
- An image that scanned clean last month can have findings today without any change to the image. New advisories arrive continuously, so scanning is something you repeat.
Reading a finding quickly
When you open a report, read each finding in this order:
- Package name and installed version: is this in the part of the image your application uses?
- Fixed version and status: can you act by upgrading, or must you work around it?
- Severity and its source: how urgent is it for this kind of flaw?
- The CVE description: does the attack path apply to how the container runs?
This order puts the questions you can answer fastest first and saves the careful reading for findings that survive them.
Exercise
A scan of your image reports CVE-2024-00000 in libexample1, installed version 1.2.3-1, severity HIGH, status will_not_fix, with an empty fixed version. A teammate says to run with --ignore-unfixed so the CI gate passes. What does that flag do here, and what should you do about the finding itself?
Show answer
--ignore-unfixed hides findings that have no fixed version, so this one would no longer appear in the report or fail the gate. The flaw is still in the image. Because the vendor will not patch it, upgrading cannot remove it. You should decide separately whether the vulnerable code path is reachable in your container, consider a base image that does not include libexample1, or remove the package. If you accept the risk, record the CVE ID and the reason in a documented ignore file so the decision can be reviewed.