Repository navigation
False negative: nginx.org apk packages on Alpine are matched against the Alpine secdb (nginx 1.31.8-r1 reported clean for nginx2root CVEs) #11699
Replies: 1 comment
|
Hello @sashalarsoo, thanks for the detailed report! You're right about the cause: We looked into whether third-party apk packages can be reliably told apart from Alpine packages, and haven't found a way so far:
It's also important that Trivy doesn't check third-party packages against their vendor's advisories, it simply skips them — this is how it currently works for dpkg (#9932) and rpm (#10118). So for now, we won't implement third-party detection for apk packages, to avoid increasing false negatives. For now, for nginx.org packages we recommend:
Regards, Dmitriy |
Uh oh!
There was an error while loading. Please reload this page.
IDs
CVE-2026-113425, CVE-2026-118899, CVE-2026-120967, CVE-2026-121810, CVE-2026-123007, CVE-2026-123633, CVE-2026-123634, CVE-2026-123640, CVE-2026-125283 (nginx, Nov 2026, "nginx2root")
Description
False negative on
nginxpackages that come from nginx.org, not from Alpine. On an Alpine 3.24 image whose nginx was installed from the nginx.org apk repository (the officialnginx:*-alpineimages), Trivy reports none of the nginx CVEs above, although the installed version is vulnerable.Why the version is vulnerable. The nginx advisories (https://nginx.org/en/security_advisories.html) list each CVE as
Vulnerable: …-1.31.8,Not vulnerable: 1.31.9+, 1.30.7+.Why Trivy misses it.
nginx 1.30.7-r0.1.31.8-r1(Maintainer: NGINX Packaging <nginx-packaging@f5.com>).1.31.8-r1 > 1.30.7-r0and concludes the package is fixed.The comparison only gives the right answer by coincidence, when both streams happen to be on the same stable branch. For example, an image with nginx.org's
1.30.4-r1is correctly flagged, because1.30.4 < 1.30.7. Every nginx.org mainline build (1.31.x) is silently reported as clean.This is the apk case of a problem Trivy already solved for other formats:
nginx-unprivileged, nginx.org packages on Alpine). It was closed with "Issue for this problem exists", but we could not find an apk issue.What would help. A third-party detection for apk, for example based on the maintainer or the origin of the package, as #9913 does for dpkg. Packages from repositories other than Alpine's should then not be matched against the Alpine secdb, or should at least be flagged as not covered by the OS advisories. A silently clean result is the worst outcome for a scanner: it is how a critical CVE slips through.
Reproduction Steps
Packagescontainsnginx 1.31.8-r1, with MaintainerNGINX Packaging <nginx-packaging@f5.com>.Vulnerabilitiescontains no entry fornginx.nginx:1.31.7-alpinegives the same result (1.31.7-r1, 0 nginx findings).nginx:1.31.9-alpineis correctly clean.The Alpine secdb entry Trivy matches against:
Target
Container Image
Scanner
Vulnerability
Target OS
Alpine Linux 3.24.4
Debug Output
Version
Checklist
-f jsonthat shows data sources and confirmed that the security advisory in data sources was correct. The Alpine advisory is correct for Alpine's nginx; the problem is that it is applied to a package Alpine did not build.All reactions