If you scan Debian, Ubuntu, Alpine, RHEL, or Amazon Linux container images in CI, you have probably triaged this alert: a scanner flags an OpenSSL or glibc CVE against your base image, you check apt-cache policy or the Debian Security Tracker, and the package is already patched.
That alert is a backport false positive.
It happens because stable Linux distributions backport security patches without bumping upstream minor version numbers.
How upstream version ranges misclassify patched Linux packages
Look at this real Trivy JSON (schema v2) finding against a Debian 12.5 container image (from fixtures/trivy-debian-backport.json in osty-dev/supply-chain-benchmark):
{ "VulnerabilityID": "CVE-2024-5535", "PkgName": "openssl", "InstalledVersion": "3.0.11-1~deb12u2", "FixedVersion": "3.0.12", "Status": "fixed", "Severity": "MEDIUM", "Title": "openssl: SSL_select_next_proto buffer overread" } The same report flags libssl3 at 3.0.11-1~deb12u2 against upstream FixedVersion: "3.0.12".
Any tool that compares the upstream prefix (3.0.11 < 3.0.12) against NVD CPE ranges concludes the container is vulnerable.
In reality, the Debian security team backported the fix for CVE-2024-5535 into 3.0.11-1~deb12u2 while preserving the 3.0.11 ABI so existing binaries do not break.
You can check the installed Debian revision directly inside any running image:
dpkg-query -W -f='${Package} ${Version}\n' openssl libssl3 dpkg --compare-versions 3.0.11-1~deb12u2 ge 3.0.11-1~deb12u2 && echo "patched" Every major enterprise Linux distribution uses its own authoritative backport feed and package version ordering:
| Distribution | Authoritative backport feed | Version comparison semantics |
|---|---|---|
| Debian | Debian Security Tracker / OVAL | dpkg epoch, upstream, and Debian revision (~deb12u2) |
| Ubuntu | Ubuntu Security Notices (USN) / OVAL | dpkg version ordering with ubuntu revision suffix |
| Alpine | Alpine SecDB | apk version comparison with -rN release suffix |
| RHEL / UBI | Red Hat CSAF / OVAL | rpm epoch-version-release (EVR) comparison |
| Amazon Linux | Amazon Linux Security Advisories (ALAS) | rpm EVR comparison scoped to AL2 / AL2023 |
When a scanner falls back to NVD CPE matching, misidentifies the base OS inside a distroless or multi-stage image, or ingests an SBOM that stripped the distro qualifier (pkg:deb/debian/openssl@3.0.11-1~deb12u2?distro=debian-12), backport truth is lost and false positives return on every build.
Three controls that stop backport false positives
1. Preserve distro PURL qualifiers in your SBOMs
Configure your SBOM generator to emit full distro package URLs including the release qualifier (?distro=debian-12, ?distro=alpine-3.19, ?distro=ubuntu-22.04).
Stripping the revision suffix or flattening OS packages into generic CPEs forces downstream vulnerability trackers back into upstream version comparison.
2. Separate builder-stage packages from runtime images
Multi-stage Dockerfiles install compilers, headers, and build tools in a builder stage and copy only the compiled binary into a minimal runtime stage.
Scanning the repository or intermediate build layers instead of the final runtime image and deployed workload surfaces CVEs for packages that never ship to production.
3. Verify against distro feeds and record VEX provenance
Before opening a remediation PR or blocking a deploy, check each OS-package CVE against the distro's own feed (Debian OVAL, Ubuntu USN, Alpine SecDB, RHEL CSAF, Amazon Linux ALAS) using native package-version comparison (dpkg, apk, rpm).
Record not_affected verdicts with traceable VEX provenance so the same finding does not resurface on the next CI run.
Three quick ways to test this on your own Trivy JSON output:
- Paste a Trivy JSON report or lockfile into osty.dev/tools/backport-check to check backport status locally in your browser without uploading files.
- Inspect
fixtures/trivy-debian-backport.jsonin osty-dev/supply-chain-benchmark, which contains theCVE-2024-5535finding on Debian 12openssl 3.0.11-1~deb12u2alongside scenarioa07(zero actionable alerts on the patched build, one alert on the unpatched build of the same upstream version). - Connect Claude Code, Cursor, or Codex to the free read-only public MCP endpoint at
https://mcp.osty.dev/mcpand callcheck_cve_backportbefore letting an agent bump your base image.
Next steps when a CVE is unpatched
When the distro feed confirms a vulnerability is unpatched, run two more checks before upgrading:
- Compiler reachability: Check whether production code actually calls the vulnerable symbol using native compiler call graphs rather than string-matching imports.
- ABI and license safety: Check whether the patched version raises the ELF
glibcsymbol floor above your target host (for example,GLIBC_2.34on aglibc 2.31node) or changes the package license.
Applying those three filters in order - distro backport truth, runtime lineage, and compiler reachability - removes most container alert noise while keeping real, reachable upgrades at the top of the queue.
See osty.dev/see and osty.dev/benchmarks for the test fixtures and methodology.


