[Bug] Poor debsecan fallback behavior for Debian Trixie
Describe the bug
Looking at the code in pegaprox/core/manager.py for the debescan command, it appears that the debsecan for Debian trixie has a fallback path which results in a significantly reduced (and somewhat irrelevant) CVE response.
The code attempts to run a debsecan to return the available FIXED CVE's for the detected suite. If no fixed CVE's are available to be installed, if the suite is trixie, it falls back to returning fixes that are available in bookworm but not yet in trixie (as it stands at the date of this post, there are 5 available fixes in bookworm for CVE's that are not yet available in trixie). This information is largely irrelevant as packages on trixie are usually in advance of bookworm which is EOL and you would not want to downgrade packages to apply the fix available in the previous distro. The fallback if the suite is not trixie is to return all relevant CVE's. A better response might be to fall back to forky or sid (testing does not work...) to pick out CVE fixes which are upstream.
Example, available CVE fixes in bookworm that are not available in trixie:
CVE-2026-14164 libarchive13t64 (fixed, obsolete)
CVE-2026-15028 libarchive13t64 (fixed, obsolete)
CVE-2026-16517 libarchive13t64 (fixed, obsolete)
CVE-2026-76957 libexpat1 (fixed)
CVE-2026-9323 python3-urwid (fixed)
Reference: https://github.com/PegaProx/project-pegaprox/blob/5f3c8ce665a8e150892765cd1f5ab6632561d830/pegaprox/core/manager.py#L15371-L15378
Side notes:
- As pasted below, there are over 1000 CVE's currently standing against trixie. The current debsecan script only returns the first 500. The list is ordered by package name so given the huge number of lib* packages in debian these days, it is likely the list will stop somewhere in the libs. Probably best to just grab them all?
- Very few packages in debsecan return a vulnerability score/severity. The default of "medium" in the code is probably an issue as there are currently ~60 "critical", ~370 "high", ~550 medium and ~100 "Low" against trixie (resolved by downloading the CVE database https://www.cve.org/downloads and doing a "join" on the CVE codes from debsecan to get a severity). This means that the debsecan run results in over 400 CVE's being downgraded incorrectly.
Steps to Reproduce
Run a debsecan on an up-to-date Debian Trixie host
Expected behavior
The full list of CVE's against the suite (trixie) are shown.
Environment
- PegaProx Version: 1.1.1
- Installation Method: Install script
- OS: Debian 13 (trixie)
- Browser: Firefox ESR (Debian 13)
- Behind Reverse Proxy? nginx
- UI? N/A
Logs
N/A
Screenshots
No screenshots but outputs of manual debsecan results:
Trixie (--only-fixed)
~# debsecan --suite trixie --only-fixed
# No output
Bookworm (--only-fixed)
~# debsecan --suite bookworm --only-fixed
CVE-2026-14164 libarchive13t64 (fixed, obsolete)
CVE-2026-15028 libarchive13t64 (fixed, obsolete)
CVE-2026-16517 libarchive13t64 (fixed, obsolete)
CVE-2026-76957 libexpat1 (fixed)
CVE-2026-9323 python3-urwid (fixed)
Trixie (All CVE's) NOTE: there are currently over 1000 open CVE's for trixie!
~# debsecan --suite trixie
CVE-2026-3184 bsdextrautils
# ** TUNCATED
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
The bookworm fallback is gone. That part is a fair catch — it's the wrong suite's data, and since PVE 9 is trixie it was every current node, triggering exactly when the node was clean. Only the detected suite gets queried now.
The cap stays, split by what the list is: 4000 for the fixed set, 500 for the all-CVE one, and the block reports the real total plus a truncation marker so a cut list is visible instead of silently short. I'm not lifting it — a thousand mostly-unfixable CVEs is not a security report, it's a wall, and at a hundred nodes that's the response payload as well.
On Testing as 6b468ca, together with #825 since it's the same function. Next release.
Marcus
@mkellermann97 Apologies, I thought I had already truncated the list (hence the comment in the top) but I was working on something else and didn't double check. Has been truncated now if it's any use!
WRT the cap, understood. It is unfortunate that debsecan doesn't have a filter or sort option, it would be nicer to prioritise by severity - perhaps I will open a ticket for them but debians bug tracker system is... what it is. I would guess that since they are basing it off the Debian CVE database (which doesn't track severity - at least not openly) that is something they can't do easily currently. For myself, I had to grab the full CVE zip then do a bit of shell scripting against the unpacked filesystem to find the severity and prioritise.
Annoyingly to get some government IT supplier sign offs (in the UK) it's required to list and track them - hence hoping the nice report from pegaprox would suite =D
No harm done on the paste — thanks for trimming it.
Your severity question turned up something, so it was worth asking. Debsecan's default output does carry Debian's urgency (low / medium / high / unimportant) as a column, and we already parse it. But --only-fixed — the mode we prefer, because it's the actionable set — leaves that column out, and the parser takes column 3 regardless. So on your output it reads (fixed) as the urgency, can't match it, and falls back to a default:
CVE-2023-31484 perl low (LTS: …) → urgency=low status="LTS: …" ✓
CVE-2026-76957 libexpat1 (fixed) → urgency=medium status="" ✗ invented
CVE-2026-14164 libarchive13t64 (fixed, obsolete)
→ urgency=medium status="obsolete" ✗ lost a word
So every entry in the fixable list currently reports as medium. That's ours and it's fixable — I'm not going to promise you a date, but it's a smaller job than I implied when you asked.
What it still won't give you is CVSS. Debian's urgency is its own triage rating, not a score, so if your sign-off wants CVSS numbers that needs a second source joined on the CVE id — which is the bigger piece, and one I'd rather get right than quick.
Marcus
Thanks for the detailed response. Prompted me to grab the source of debsecan and take a look at some of the files it pulls (as well as the debian-security repo and accompanying info page) whilst I had a bit of time this morning before kicking off work.
Looking at the files that debsecan uses (I hadn't realised but every run of debsecan pulls down a file from debian's servers, it doesn't appear to be cached anywhere... https://security-tracker.debian.org/tracker/debsecan/release/1/[suite|GENERIC] - its a zlib compressed file ~2MiB) very few of the package/CVE combinations have an "urgency" flag on them (roughly about 10%). That is after the deb sec team have tagged if a CVE is something that does actually impact a package debian supplies (they discard anything that only affects examples, source code that they don't compile for the package, etc).
You are right that the only option for CVSS at the moment is to do as I have, download the CVE list and do your own join. The CVE updates debian pulls also do not pull the CVSS so they don't follow that autonomously either. Their urgency metrics are based on manually checking the CVE and deciding on their determination of threat level.
The request to track all CVE's in a provided service/solution is absolutely asinine but we (and many others) contractually have to do it. I could almost guarantee it would never actually be checked so we could perhaps get away with debian's own urgency level. But if anyone ever did, the CVSS covers us completely...
Thanks again!
The 10% figure settles it, thanks - that's the number I didn't have. Fixing our parser stops us inventing "medium" for everything, but sorting by severity off debsecan alone would rank one entry in ten and leave the rest unordered, which is worse than not offering it. So CVSS via a joined second source is the only version of that feature worth building, and it's a proper piece of work rather than something to squeeze in.
The other half of your digging is more immediately useful to us: a ~2 MiB pull from security-tracker.debian.org per run, uncached. We scan per node, so a 100-node estate means 200 MiB fetched from Debian's infrastructure every sweep, and the scan is as slow as their server is that morning. That's ours to be smarter about - fetch once per scan and share it, or cache with a sane TTL. Hadn't occurred to me before you went and read the source.
And no argument on the requirement. Tracking every CVE in a shipped product is a box-ticking exercise for most of it, but "most" isn't a defence when someone does look.
Marcus
That's ours to be smarter about - fetch once per scan and share it, or cache with a sane TTL.
On that note in case you weren't already aware, debsecan does have a "--source" flag which you can use to do exactly that. You could download per suite (+GENERIC) once manually to an accessible location (either a web server or a filesystem). Then you can use debsecan --suite trixie --source https://debsec.internal/ or debsecan --suite trixie --source file:///media/debsecshare/ to use your cached/shared copy instead of pulling from debian servers for each node.
Didn't know about --source, and that's the lever - the man page has it as "Override the default download URL for vulnerability data". Fetch the suite file once per sweep, point every node at it, and the 200 MiB goes back to 2. Much better than a TTL cache on our side, because it also means Debian's servers see one request per scan instead of one per node.
Noted with your name on it. Thanks for looking it up.
Marcus
The fallback behaviour you reported went out with 1.2.0 — the scan measures against the right suite now instead of guessing.
Keeping this one open on purpose though, because of the --source point further up. Fetching the suite data once per sweep and pointing every node at it is the better shape than any cache on our side, and it means Debian sees one request per scan rather than one per node. That isn't built yet and I don't want it to disappear into a closed ticket.
Marcus
Closing this one, the suite fallback you reported shipped in 1.2.0. The --source idea from further up isn’t built yet, but it’s on our list, so it doesn’t get lost with the ticket. Thanks again for the digging.