<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Javel Rowe</title>
  <link>https://javel.dev/</link>
  <description>DevOps engineer writing about Kubernetes, CI/CD, infrastructure as code, and keeping production boring.</description>
  <language>en</language>
  <atom:link href="https://javel.dev/feed.xml" rel="self" type="application/rss+xml"/>
  <item>
    <title>Can one CVE ID point to two vulnerabilities?</title>
    <link>https://javel.dev/blog/one-cve-id-two-vulnerabilities/</link>
    <guid isPermaLink="true">https://javel.dev/blog/one-cve-id-two-vulnerabilities/</guid>
    <pubDate>Tue, 10 Nov 2026 00:00:00 GMT</pubDate>
    <description>It's not supposed to happen, but CVE-2026-76844 pointed to two different packages for a while, and the sources scanners pull from disagreed on which one.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>TLDR:</p>
<ul>
<li>It&#39;s not supposed to happen, but it did with CVE-2026-76844 for a period of time.</li>
<li>At one point, updates to the record changed the package it pointed to: from webpack-dev-middleware to zlib, and later back again.</li>
<li>While that was happening, sources were mixed. Some showed webpack-dev-middleware and others showed zlib.</li>
<li>Scanners pull from both kinds of source, so one ID can flag two unrelated packages with a mix of details from each.</li>
</ul>
<h2 id="how-does-a-vulnerability-get-a-cve-id">How does a vulnerability get a CVE ID?</h2>
<p>Someone finds a vulnerability and reports it to a CVE Numbering Authority (CNA). The CNA requests and reserves an ID, fills in the details, then publishes the record so anyone can see it.</p>
<h3 id="can-it-go-to-any-cna">Can it go to any CNA?</h3>
<p>Each CNA has a scope that states what it&#39;s allowed to assign IDs for.</p>
<ul>
<li>Vendor and project CNAs cover their own products.</li>
<li>Research CNAs cover vulnerabilities they find or get told about, unless a CNA with a more specific scope covers that product.</li>
<li>The rules say the CNA with the most appropriate scope should be contacted first and given the first chance to assign. (<a href="https://www.cve.org/ResourcesSupport/AllResources/CNARules">CNA Operational Rules, 4.2.1.1</a>)</li>
</ul>
<p>CNAs also sit in a hierarchy:</p>
<ul>
<li>Each CNA reports to a Root.</li>
<li>Roots report to the Top-Level Root, which is MITRE.</li>
</ul>
<h3 id="what-happens-if-a-vulnerability-doesnt-fit-a-scope-or-fits-more-than-one">What happens if a vulnerability doesn&#39;t fit a scope, or fits more than one?</h3>
<p>The CNA with the most specific scope takes jurisdiction. A project&#39;s own CNA beats a general research CNA. If no scope fits, it falls to research CNAs, or to the CNA of Last Resort (MITRE).</p>
<h2 id="what-happens-after-a-cve-is-published">What happens after a CVE is published?</h2>
<p>The published records are available in the <a href="https://www.cve.org/">CVE List</a>. Its history is public in the cvelistV5 repo on GitHub, so you can see each version of a record.</p>
<p>Here’s how the data flows from the CVE list to a security scanner (in this case, Trivy):</p>
<ul>
<li>Feeds pick it up from there: NVD, Red Hat, Amazon Linux (ALAS), the GitHub Advisory Database (GHSA), the Debian security tracker and others.</li>
<li>Each feed pulls on its own schedule and has its own processes:<ul>
<li>NVD adds its own analysis on top, like CVSS scores and a CWE.</li>
<li>Distros like Debian and Red Hat map the CVE to their own package versions and fixes.</li>
<li>GHSA advisories get reviewed and are often written with the project&#39;s maintainers.</li>
</ul>
</li>
<li>Some of this is automated with a review step and some sources also combine data from several other sources.</li>
<li>Trivy then pulls from the various feeds to populate its database of vulnerabilities.</li>
</ul>
<h2 id="what-does-this-say-about-the-tools-we-rely-on">What does this say about the tools we rely on?</h2>
<ul>
<li>Trust, but verify. A scanner can only be as consistent as the sources behind it.</li>
<li>Knowing which data sources feed your tool can help with handling discrepancies. For Trivy that&#39;s distro trackers, GHSA, NVD and others, and different fields can come from different places.</li>
<li>Take it a step further and understand how those sources get their data and what checks happen along the way.</li>
<li>When something looks off, check the package&#39;s own feed directly.</li>
</ul>
<h2 id="when-did-each-change-happen">When did each change happen?</h2>
<p>All times UTC (2026).</p>
<table>
<thead>
<tr>
<th>When</th>
<th>Event</th>
<th>Source</th>
</tr>
</thead>
<tbody><tr>
<td>Aug 19</td>
<td>CVE-2026-76844 reserved</td>
<td><a href="https://cveawg.mitre.org/api/cve/CVE-2026-76844">CVE Services API</a></td>
</tr>
<tr>
<td>Aug 24 13:12</td>
<td>Record published describing a path traversal in webpack-dev-middleware</td>
<td><a href="https://github.com/CVEProject/cvelistV5/commit/211711e8e69a5f85927f9c892c1a4636daf0ee3b">cvelistV5 211711e</a></td>
</tr>
<tr>
<td>Aug 24 13:25</td>
<td>Red Hat Bugzilla entry created for webpack-dev-middleware</td>
<td><a href="https://bugzilla.redhat.com/show_bug.cgi?id=2521896">Bugzilla 2521896</a></td>
</tr>
<tr>
<td>Aug 24 14:17</td>
<td>Record appears in NVD</td>
<td><a href="https://services.nvd.nist.gov/rest/json/cvehistory/2.0?cveId=CVE-2026-76844">NVD change history</a></td>
</tr>
<tr>
<td>Aug 26</td>
<td>Record references updated</td>
<td><a href="https://github.com/CVEProject/cvelistV5/commit/f59bcd35cd43a2ec64d0675d7034738b6d525bca">cvelistV5 f59bcd3</a></td>
</tr>
<tr>
<td>Aug 28</td>
<td>ALAS page last modified, describing webpack-dev-middleware</td>
<td><a href="https://explore.alas.aws.amazon.com/CVE-2026-76844.html">ALAS</a></td>
</tr>
<tr>
<td>Sep 3</td>
<td>GitHub advisory for webpack-dev-middleware published, listing CVE-2026-76844</td>
<td><a href="https://github.com/advisories/GHSA-g84c-rxfj-3j2c">GHSA-g84c-rxfj-3j2c</a></td>
</tr>
<tr>
<td>Sep 21</td>
<td>Red Hat erratum for webpack-dev-middleware released</td>
<td><a href="https://access.redhat.com/errata/RHSA-2026:69296">RHSA-2026:69296</a></td>
</tr>
<tr>
<td>Sep 29</td>
<td>Duplicate GitHub advisory withdrawn</td>
<td><a href="https://github.com/advisories/GHSA-p3f5-w63m-mxph">GHSA-p3f5-w63m-mxph</a></td>
</tr>
<tr>
<td>Oct 1 10:46</td>
<td>Record adds fixed versions 7.4.6 and 8.3.0 for webpack-dev-middleware</td>
<td><a href="https://github.com/CVEProject/cvelistV5/commit/8681b2f352cec6fcb8b51e1ea1a7b391f6159102">cvelistV5 8681b2f</a></td>
</tr>
<tr>
<td>Oct 1 11:03</td>
<td>Record changes to describe a heap buffer overflow in zlib 1.2.11 through 1.3.2</td>
<td><a href="https://github.com/CVEProject/cvelistV5/commit/c1fa2f3c9a0367698463bf7d29acc3e67a41c3ef">cvelistV5 c1fa2f3</a></td>
</tr>
<tr>
<td>Oct 1 11:17, 12:17</td>
<td>NVD record updated with both changes</td>
<td><a href="https://services.nvd.nist.gov/rest/json/cvehistory/2.0?cveId=CVE-2026-76844">NVD change history</a></td>
</tr>
<tr>
<td>Oct 7 – 26</td>
<td>Issue about the record opened and closed in the zlib repo</td>
<td><a href="https://github.com/madler/zlib/issues/1330">madler/zlib#1330</a></td>
</tr>
<tr>
<td>Nov 4 – 6</td>
<td>Debian bug tracks CVE-2026-76844 against zlib</td>
<td><a href="https://bugs.debian.org/1153063">Debian #1153063</a></td>
</tr>
<tr>
<td>Nov 7</td>
<td>Debian security advisory for zlib lists CVE-2026-76844</td>
<td><a href="https://security-tracker.debian.org/tracker/DSA-6613-1">DSA-6613-1</a></td>
</tr>
<tr>
<td>Nov 11 20:18 – 20:20</td>
<td>Red Hat Bugzilla title changes to describe the zlib heap buffer overflow</td>
<td><a href="https://bugzilla.redhat.com/show_activity.cgi?id=2521896">Bugzilla 2521896 history</a></td>
</tr>
<tr>
<td>Nov 12 03:18</td>
<td>Trivy&#39;s Red Hat data (vuln-list-redhat) picks up the zlib title</td>
<td><a href="https://github.com/aquasecurity/vuln-list-redhat/commit/3446d6e910fd71c1b31fdb552c9a44c00b17eb8a">vuln-list-redhat 3446d6e</a></td>
</tr>
<tr>
<td>Nov 13 14:15</td>
<td>Record changes back to describe the path traversal in webpack-dev-middleware</td>
<td><a href="https://github.com/CVEProject/cvelistV5/commit/50de8bbd1a54349af1cedaad072cb9d8ae870551">cvelistV5 50de8bb</a></td>
</tr>
<tr>
<td>Nov 13 14:15</td>
<td>CVE-2026-85091 updated to describe the zlib heap buffer overflow in 1.2.11 through 1.3.2</td>
<td><a href="https://github.com/CVEProject/cvelistV5/commit/50de8bbd1a54349af1cedaad072cb9d8ae870551">cvelistV5 50de8bb</a></td>
</tr>
<tr>
<td>Nov 13 15:17</td>
<td>NVD record updated to describe webpack-dev-middleware</td>
<td><a href="https://services.nvd.nist.gov/rest/json/cvehistory/2.0?cveId=CVE-2026-76844">NVD change history</a></td>
</tr>
</tbody></table>
]]></content:encoded>
  </item>
  <item>
    <title>Can Trivy flag SSHOLE in Alpine images?</title>
    <link>https://javel.dev/blog/trivy-sshole/</link>
    <guid isPermaLink="true">https://javel.dev/blog/trivy-sshole/</guid>
    <pubDate>Fri, 06 Nov 2026 00:00:00 GMT</pubDate>
    <description>Investigating how Trivy detects SSHOLE and what can prevent it from flagging vulnerable openssh packages</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Yes, Trivy will flag vulnerable OpenSSH versions. These conditions need to be met for it to be flagged:</p>
<ul>
<li>the openssh package was installed from the Alpine repo</li>
<li>Alpine maintainers published the version number of the fix to <a href="https://secdb.alpinelinux.org/">secdb</a>. On Alpine 3.24, that&#39;s <code>openssh 10.3_p1-r2</code>.</li>
</ul>
<h2 id="how-does-data-flow-from-disclosure-to-detection">How does data flow from disclosure to detection?</h2>
<p><img src="/blog/trivy-sshole/alpine-cve-flow.png" srcset="/blog/trivy-sshole/alpine-cve-flow-640.webp 640w, /blog/trivy-sshole/alpine-cve-flow-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="2160" height="2700" alt="Five steps from disclosure to detection: the maintainer is alerted to the OpenSSH password auth bypass, pushes the patch (384e25e6), records fixed version 10.3_p1-r2 as a secfix that lands in secdb, scanners pull it into their advisory DB, and the scan flags openssh 10.3_p1-r1 in an alpine:3.24 image." loading="lazy" decoding="async"></p>
<h2 id="how-does-the-fix-get-to-trivy">How does the fix get to Trivy?</h2>
<p>TLDR: </p>
<ol>
<li>maintainers push patch </li>
<li>maintainers update secfix details in the APKBUILD</li>
<li>CVE + patch details pushed to secdb</li>
<li>Trivy downloads details to its DB</li>
<li>Trivy scan detects vulnerable package</li>
</ol>
<h3 id="maintainers-push-patched-package">Maintainers push patched package</h3>
<p>A maintainer creates the fix and pushes the patch to Alpine&#39;s package repo. For SSHOLE on 3.24, that&#39;s <a href="https://gitlab.alpinelinux.org/alpine/aports/-/commit/384e25e6">main/openssh: fix password authentication (384e25e6)</a>. </p>
<h3 id="maintainers-push-secfix-details">Maintainers push secfix details</h3>
<p>After pushing the patch, maintainers also create what&#39;s known as a secfix. A secfix is a comment block in the package&#39;s build file (APKBUILD) that records which version patches which CVE:</p>
<pre><code># secfixes:
#   10.3_p1-r2:
#     - CVE-2026-123158
</code></pre><p>After it&#39;s merged (<a href="https://gitlab.alpinelinux.org/alpine/aports/-/commit/1d539b51">1d539b51</a> for 3.24, <a href="https://gitlab.alpinelinux.org/alpine/aports/-/commit/819ca256416f083854095c167c495d2cc664fd57">819ca256</a> for edge), it shows up in secdb shortly after.</p>
<h3 id="details-about-the-patch-get-stored-in-secdb">Details about the patch get stored in secdb</h3>
<p>secdb is Alpine&#39;s security database. It&#39;s a set of JSON files, one per release and repo (e.g. <code>v3.24/main.json</code>), generated from all the secfixes in aports. For each package, it lists the CVEs that were fixed and the version that fixed them.</p>
<p>Here’s what that looks like:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> curl -s https://secdb.alpinelinux.org/v3.24/main.json | jq -c <span class="hljs-string">&#x27;.packages[] | select(.pkg.name==&quot;openssh&quot;) | .pkg.secfixes[&quot;10.3_p1-r2&quot;]&#x27;</span></span><span class="line"><span class="hljs-output">[&quot;CVE-2026-123158&quot;]</span></span>
</code></pre><h3 id="trivy-gets-details-about-which-cve-the-patch-fixes">Trivy gets details about which CVE the patch fixes</h3>
<p>Trivy pulls secdb into its own vulnerability DB. </p>
<p>Scanning generally follows these steps:</p>
<ul>
<li>create an SBOM using the list of installed packages from the apk database</li>
<li>compare the installed version against the fixed version in the Trivy vulnerability DB.</li>
</ul>
<p><strong>Result:</strong> If the installed version is lower than the fixed version, it gets flagged.</p>
<h2 id="why-would-a-vulnerable-openssh-package-not-get-flagged">Why would a vulnerable openssh package not get flagged?</h2>
<p>Sometimes there&#39;s a lag between when the patch gets pushed and when the secfix gets added to secdb. In that window, scanners that depend only on secdb won&#39;t flag vulnerable versions, even though the patched version is already available.</p>
<p>That&#39;s what happened with SSHOLE on 3.24. The patch was pushed Nov 5 at 08:59 UTC, but the secfix wasn&#39;t added until Nov 6 at 10:34 UTC, about 25.5 hours later.</p>
<p>Here&#39;s what that looked like on Nov 5 at 20:35 UTC:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># the patched version is already in the 3.24 repo</span></span><span class="line"><span class="hljs-prompt">$</span> curl -s https://dl-cdn.alpinelinux.org/alpine/v3.24/main/x86_64/APKINDEX.tar.gz | tar -xzO APKINDEX | awk <span class="hljs-string">&#x27;/^P:openssh-server$/{f=1} f&amp;&amp;/^V:/{print;f=0}&#x27;</span></span><span class="line"><span class="hljs-output">V:10.3_p1-r2</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># but secdb doesn&#x27;t have the CVE yet</span></span><span class="line"><span class="hljs-prompt">$</span> curl -s https://secdb.alpinelinux.org/v3.24/main.json | grep -c <span class="hljs-string">&#x27;CVE-2026-123158&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># so the image with the vulnerable version comes back clean</span></span><span class="line"><span class="hljs-prompt">$</span> podman <span class="hljs-built_in">exec</span> sshole-vuln apk info -v | grep <span class="hljs-string">&#x27;^openssh&#x27;</span></span><span class="line"><span class="hljs-output">openssh-keygen-10.3_p1-r1</span></span><span class="line"><span class="hljs-output">openssh-server-10.3_p1-r1</span></span><span class="line"><span class="hljs-output">openssh-server-common-10.3_p1-r1</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json --input vuln.tar | jq <span class="hljs-string">&#x27;[.Results[].Vulnerabilities[]? | select(.VulnerabilityID==&quot;CVE-2026-123158&quot;)] | length&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span>
</code></pre><p>To see what this process looks like for PHP2SHELL, check out <a href="/blog/trivy-php2shell/">Can Trivy flag PHP2SHELL in a container image?</a>.</p>
]]></content:encoded>
  </item>
  <item>
    <title>Can Trivy flag PHP2SHELL in a container image?</title>
    <link>https://javel.dev/blog/trivy-php2shell/</link>
    <guid isPermaLink="true">https://javel.dev/blog/trivy-php2shell/</guid>
    <pubDate>Fri, 30 Oct 2026 00:00:00 GMT</pubDate>
    <description>Trivy can detect php2shell but there are a few cases where it can be missed. We'll explore them here.</description>
    <content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>Trivy detects vulnerable packages by first creating a Software Bill of Materials that contains all the packages installed on the distro via the package manager from the official distro pkg repo. It then checks the packages against the CVE advisory feed for the specific distro &amp; release.</p>
<p><img src="/blog/trivy-php2shell/image-1.png" srcset="/blog/trivy-php2shell/image-1-640.webp 640w, /blog/trivy-php2shell/image-1-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="218" alt="Trivy's scan flow: your Ubuntu 24.04 image, then 1. list what's installed (the SBOM), then 2. check advisories for Ubuntu 24.04, then php8.3-cli is flagged" loading="lazy" decoding="async"></p>
<p>This process seems pretty straightforward, however on closer look, there are actually a few conditions that must be met before a vulnerable pkg can be flagged. Let’s approach these as a series of questions that will provide all the details needed to evaluate a pkg.</p>
<h2 id="what-packages-are-in-the-image">What packages are in the image?</h2>
<p><img src="/blog/trivy-php2shell/image-2.png" srcset="/blog/trivy-php2shell/image-2-640.webp 640w, /blog/trivy-php2shell/image-2-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="370" alt="Three ways PHP gets into an image: apt install puts the package in the dpkg database so it's scanned; make install and rm -rf /var/lib/dpkg leave nothing in the database, so there's nothing to check" loading="lazy" decoding="async"></p>
<p>Trivy only detects packages that are recorded in the package DB. Packages can be invisible to Trivy for two reasons:</p>
<ul>
<li>if the package was built from source </li>
<li>if the package DB was removed from the image</li>
</ul>
<p>Here’s what this looks like in practice:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># holds: php8.3 installed from .deb, so dpkg knows about it</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c1-holds php -v | <span class="hljs-built_in">head</span> -1</span><span class="line"><span class="hljs-output">PHP 8.3.6 (cli) (built: Oct  7 2026 18:06:38) (NTS)</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c1-holds dpkg -l <span class="hljs-string">&#x27;php8.3*&#x27;</span> | awk <span class="hljs-string">&#x27;/^ii/ {print $2, $3}&#x27;</span></span><span class="line"><span class="hljs-output">php8.3-cli 8.3.6-0ubuntu0.24.04.12</span></span><span class="line"><span class="hljs-output">php8.3-common 8.3.6-0ubuntu0.24.04.12</span></span><span class="line"><span class="hljs-output">php8.3-opcache 8.3.6-0ubuntu0.24.04.12</span></span><span class="line"><span class="hljs-output">php8.3-readline 8.3.6-0ubuntu0.24.04.12</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q --list-all-pkgs -f json php2shell:c1-holds | jq -r <span class="hljs-string">&#x27;.Results[].Packages[].Name&#x27;</span> | grep php</span><span class="line"><span class="hljs-output">php-common</span></span><span class="line"><span class="hljs-output">php8.3-cli</span></span><span class="line"><span class="hljs-output">php8.3-common</span></span><span class="line"><span class="hljs-output">php8.3-opcache</span></span><span class="line"><span class="hljs-output">php8.3-readline</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken: same PHP built from source, dpkg never hears about it</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c1-broken-source php -v | <span class="hljs-built_in">head</span> -1</span><span class="line"><span class="hljs-output">PHP 8.3.6 (cli) (built: Oct 30 2026 12:58:49) (NTS)</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c1-broken-source dpkg -l <span class="hljs-string">&#x27;php8.3*&#x27;</span></span><span class="line"><span class="hljs-output">dpkg-query: no packages found matching php8.3*</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q --list-all-pkgs -f json php2shell:c1-broken-source | jq -r <span class="hljs-string">&#x27;.Results[].Packages[].Name&#x27;</span> | grep php</span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken: installed from .deb, then /var/lib/dpkg deleted</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c1-broken-no-db php -v | <span class="hljs-built_in">head</span> -1</span><span class="line"><span class="hljs-output">PHP 8.3.6 (cli) (built: Oct  7 2026 18:06:38) (NTS)</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c1-broken-no-db dpkg -l <span class="hljs-string">&#x27;php8.3*&#x27;</span></span><span class="line"><span class="hljs-output">dpkg-query: no packages found matching php8.3*</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image php2shell:c1-broken-no-db 2&gt;&amp;1 | grep -o <span class="hljs-string">&#x27;No OS package is detected.*&#x27;</span></span><span class="line"><span class="hljs-output">No OS package is detected. Make sure you haven't deleted any files that contain information about the installed packages.</span></span>
</code></pre><h2 id="where-does-trivy-get-cve-data">Where does Trivy get CVE data?</h2>
<p><img src="/blog/trivy-php2shell/image-3.png" srcset="/blog/trivy-php2shell/image-3-640.webp 640w, /blog/trivy-php2shell/image-3-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="344" alt="Known distros such as Ubuntu 24.04, Debian 12, Alpine 3.22 and RHEL 9 get their advisories looked up; an unknown OS like FakeOS 1.0 has no advisory set, so nothing is looked up" loading="lazy" decoding="async"></p>
<p>A security advisory feed is published for each distro and its associated release. Trivy pulls this data to know which source packages to match against what’s captured in the SBOM.</p>
<p>This is what it looks like:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># holds: os-release says Ubuntu 24.04</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c2-holds grep -E <span class="hljs-string">&#x27;^(ID|VERSION_ID)=&#x27;</span> /etc/os-release</span><span class="line"><span class="hljs-output">VERSION_ID=&quot;24.04&quot;</span></span><span class="line"><span class="hljs-output">ID=ubuntu</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c2-holds | jq -c .Metadata.OS</span><span class="line"><span class="hljs-output">{&quot;Family&quot;:&quot;ubuntu&quot;,&quot;Name&quot;:&quot;24.04&quot;}</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c2-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">4</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken: os-release says fakeos 1.0, lsb-release and debian_version removed</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c2-broken grep -E <span class="hljs-string">&#x27;^(ID|VERSION_ID)=&#x27;</span> /etc/os-release</span><span class="line"><span class="hljs-output">ID=fakeos</span></span><span class="line"><span class="hljs-output">VERSION_ID=&quot;1.0&quot;</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c2-broken <span class="hljs-built_in">ls</span> /etc/lsb-release /etc/debian_version</span><span class="line"><span class="hljs-output">ls: cannot access '/etc/lsb-release': No such file or directory</span></span><span class="line"><span class="hljs-output">ls: cannot access '/etc/debian_version': No such file or directory</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c2-broken | jq -c .Metadata.OS</span><span class="line"><span class="hljs-output">{&quot;Family&quot;:&quot;none&quot;,&quot;Name&quot;:&quot;&quot;}</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c2-broken | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span>
</code></pre><h2 id="are-all-detected-packages-scanned">Are all detected packages scanned?</h2>
<p><img src="/blog/trivy-php2shell/image-4.png" srcset="/blog/trivy-php2shell/image-4-640.webp 640w, /blog/trivy-php2shell/image-4-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="336" alt="Decision: if a package's Maintainer is on the deny-list it's treated as third-party and skipped (e.g. docker-ce-cli); if not, it's official and scanned (e.g. php8.3-cli)" loading="lazy" decoding="async"></p>
<p>Packages can either be installed from local sources, pulled from official distro owned repos or 3rd party repos. Trivy scans packages that are sourced from distro owned repos. On Ubuntu, it determines this by checking if the specified Maintainer exists on a provided deny list.</p>
<p>Here’s what that looks like:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># holds: php8.3-* maintained by Ubuntu</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c3-holds dpkg-query -W -f=<span class="hljs-string">&#x27;${Package}: ${Maintainer}\n&#x27;</span> <span class="hljs-string">&#x27;php8.3-*&#x27;</span> | grep @</span><span class="line"><span class="hljs-output">php8.3-cli: Ubuntu Developers &lt;ubuntu-devel-discuss@lists.ubuntu.com&gt;</span></span><span class="line"><span class="hljs-output">php8.3-common: Ubuntu Developers &lt;ubuntu-devel-discuss@lists.ubuntu.com&gt;</span></span><span class="line"><span class="hljs-output">php8.3-opcache: Ubuntu Developers &lt;ubuntu-devel-discuss@lists.ubuntu.com&gt;</span></span><span class="line"><span class="hljs-output">php8.3-readline: Ubuntu Developers &lt;ubuntu-devel-discuss@lists.ubuntu.com&gt;</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image --debug php2shell:c3-holds 2&gt;&amp;1 | grep -o <span class="hljs-string">&#x27;Skipping third-party packages.*&#x27;</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c3-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">4</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken (simulated): same packages, Maintainer rewritten to Docker&#x27;s</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c3-broken dpkg-query -W -f=<span class="hljs-string">&#x27;${Package}: ${Maintainer}\n&#x27;</span> <span class="hljs-string">&#x27;php8.3-*&#x27;</span> | grep @</span><span class="line"><span class="hljs-output">php8.3-cli: Docker &lt;support@docker.com&gt;</span></span><span class="line"><span class="hljs-output">php8.3-common: Docker &lt;support@docker.com&gt;</span></span><span class="line"><span class="hljs-output">php8.3-opcache: Docker &lt;support@docker.com&gt;</span></span><span class="line"><span class="hljs-output">php8.3-readline: Docker &lt;support@docker.com&gt;</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image --debug php2shell:c3-broken 2&gt;&amp;1 | grep -o <span class="hljs-string">&#x27;Skipping third-party packages.*&#x27;</span></span><span class="line"><span class="hljs-output">Skipping third-party packages   packages=[php8.3-cli php8.3-common php8.3-opcache php8.3-readline]</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c3-broken | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span>
</code></pre><h2 id="when-is-a-package-vulnerable">When is a package vulnerable?</h2>
<p><img src="/blog/trivy-php2shell/image-5.png" srcset="/blog/trivy-php2shell/image-5-640.webp 640w, /blog/trivy-php2shell/image-5-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="470" alt="Timeline: when the CVE was published, supported Ubuntu 24.04 recorded it, but end-of-life Ubuntu 24.10 did not" loading="lazy" decoding="async"></p>
<p>Advisory releases are updated with CVEs until they reach end of life. Trivy will flag all relevant CVEs detected using the advisory release associated with the distro. In this case, since Ubuntu 24.10 is EOL, it does not contain an updated list of CVEs and thus, PHP2SHELL would not be detected there.</p>
<p>This is what that looks like:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># holds: noble (24.04), and the advisory has a noble entry</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c4-holds grep VERSION_CODENAME /etc/os-release</span><span class="line"><span class="hljs-output">VERSION_CODENAME=noble</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c4-holds dpkg-query -W php8.3-cli</span><span class="line"><span class="hljs-output">php8.3-cli      8.3.6-0ubuntu0.24.04.12</span></span><span class="line"><span class="hljs-prompt">$</span> curl -s https://raw.githubusercontent.com/aquasecurity/vuln-list/main/ubuntu/2026/CVE-2026-109618.json | jq -c <span class="hljs-string">&#x27;.Patches.&quot;php8.3&quot;.noble&#x27;</span></span><span class="line"><span class="hljs-output">{&quot;Status&quot;:&quot;released&quot;,&quot;Note&quot;:&quot;8.3.6-0ubuntu0.24.04.13&quot;}</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c4-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">4</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken: oracular (24.10), php8.3 installed, but no oracular entry</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c4-broken grep VERSION_CODENAME /etc/os-release</span><span class="line"><span class="hljs-output">VERSION_CODENAME=oracular</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c4-broken dpkg-query -W php8.3-cli</span><span class="line"><span class="hljs-output">php8.3-cli      8.3.11-0ubuntu0.24.10.5</span></span><span class="line"><span class="hljs-prompt">$</span> curl -s https://raw.githubusercontent.com/aquasecurity/vuln-list/main/ubuntu/2026/CVE-2026-109618.json | jq -c <span class="hljs-string">&#x27;.Patches.&quot;php8.3&quot;.oracular&#x27;</span></span><span class="line"><span class="hljs-output">null</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image php2shell:c4-broken 2&gt;&amp;1 | grep -o <span class="hljs-string">&#x27;This OS version is no longer supported.*&#x27;</span></span><span class="line"><span class="hljs-output">This OS version is no longer supported by the distribution      family=&quot;ubuntu&quot; version=&quot;24.10&quot;</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c4-broken | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span>
</code></pre><h2 id="how-does-trivy-tell-a-vulnerable-version-from-a-patched-one">How does Trivy tell a vulnerable version from a patched one?</h2>
<p><img src="/blog/trivy-php2shell/image-6.png" srcset="/blog/trivy-php2shell/image-6-640.webp 640w, /blog/trivy-php2shell/image-6-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="294" alt="Version line: the installed .12 build sits below the fix at .13, so it's flagged; .13 and later are not flagged" loading="lazy" decoding="async"></p>
<p>The security advisory also contains the specific version of a package that is patched and safe to install. If the version number installed on the system is less than the patched version, it will be flagged as vulnerable. In the event that no patched version is available, all versions of the package will be flagged.</p>
<p>Here’s how it looks:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># holds: the .12 build from Launchpad</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c5-holds dpkg-query -W -f=<span class="hljs-string">&#x27;${Version}\n&#x27;</span> php8.3-cli</span><span class="line"><span class="hljs-output">8.3.6-0ubuntu0.24.04.12</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c5-holds sh -c <span class="hljs-string">&#x27;dpkg --compare-versions &quot;$(dpkg-query -W -f=&quot;\${Version}&quot; php8.3-cli)&quot; lt 8.3.6-0ubuntu0.24.04.13 &amp;&amp; echo below fix || echo at/after fix&#x27;</span></span><span class="line"><span class="hljs-output">below fix</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c5-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">4</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken: whatever apt installs today (.13)</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c5-broken dpkg-query -W -f=<span class="hljs-string">&#x27;${Version}\n&#x27;</span> php8.3-cli</span><span class="line"><span class="hljs-output">8.3.6-0ubuntu0.24.04.13</span></span><span class="line"><span class="hljs-prompt">$</span> docker compose <span class="hljs-built_in">exec</span> c5-broken sh -c <span class="hljs-string">&#x27;dpkg --compare-versions &quot;$(dpkg-query -W -f=&quot;\${Version}&quot; php8.3-cli)&quot; lt 8.3.6-0ubuntu0.24.04.13 &amp;&amp; echo below fix || echo at/after fix&#x27;</span></span><span class="line"><span class="hljs-output">at/after fix</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c5-broken | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span>
</code></pre><h2 id="where-does-trivy-keep-its-cve-data">Where does Trivy keep its CVE data?</h2>
<p><img src="/blog/trivy-php2shell/image-7.png" srcset="/blog/trivy-php2shell/image-7-640.webp 640w, /blog/trivy-php2shell/image-7-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="470" alt="Timeline: the DB is downloaded on day 1, then a CVE is published; scans before the DB refresh miss it (the blind spot), and scans after the refresh catch it" loading="lazy" decoding="async"></p>
<p>Trivy uses an offline copy of the CVE data during the scan. This creates the potential for a scenario where a CVE is released before the current data is refreshed. </p>
<p>This is what that can look like:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># holds: today&#x27;s DB has the advisory</span></span><span class="line"><span class="hljs-prompt">$</span> docker run --<span class="hljs-built_in">rm</span> php2shell:stale-db --cache-dir /fresh version | grep UpdatedAt</span><span class="line"><span class="hljs-output">  UpdatedAt: 2026-10-30 07:16:25.054174501 +0000 UTC</span></span><span class="line"><span class="hljs-prompt">$</span> docker run --<span class="hljs-built_in">rm</span> --entrypoint dbkey php2shell:stale-db get /fresh/db/trivy.db <span class="hljs-string">&#x27;ubuntu 24.04&#x27;</span> php8.3 CVE-2026-109618</span><span class="line"><span class="hljs-output">{&quot;FixedVersion&quot;:&quot;8.3.6-0ubuntu0.24.04.13&quot;}</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c6-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">4</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken (simulated): a DB from before 21 Oct, same image, --skip-db-update</span></span><span class="line"><span class="hljs-prompt">$</span> docker run --<span class="hljs-built_in">rm</span> php2shell:stale-db version | grep UpdatedAt</span><span class="line"><span class="hljs-output">  UpdatedAt: 2026-10-20 07:00:00 +0000 UTC</span></span><span class="line"><span class="hljs-prompt">$</span> docker run --<span class="hljs-built_in">rm</span> --entrypoint dbkey php2shell:stale-db get /root/.cache/trivy/db/trivy.db <span class="hljs-string">&#x27;ubuntu 24.04&#x27;</span> php8.3 CVE-2026-109618</span><span class="line"><span class="hljs-output">not found</span></span><span class="line"><span class="hljs-prompt">$</span> docker run --<span class="hljs-built_in">rm</span> -v /var/run/docker.sock:/var/run/docker.sock php2shell:stale-db image -q -f json --skip-db-update php2shell:c6-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span>
</code></pre><h2 id="why-might-a-vulnerable-package-not-show-up-in-the-report">Why might a vulnerable package not show up in the report?</h2>
<p><img src="/blog/trivy-php2shell/image-8.png" srcset="/blog/trivy-php2shell/image-8-640.webp 640w, /blog/trivy-php2shell/image-8-1280.webp 1280w" sizes="(min-width: 42rem) 624px, calc(100vw - 3rem)" width="1344" height="302" alt="php8.3-cli 8.3.6-0ubuntu0.24.04.12 only gets flagged after passing six filters: severity, fix status, .trivyignore, Rego policy, VEX and skip dirs, set by flags, env vars and policy or ignore files" loading="lazy" decoding="async"></p>
<p>Trivy can be configured using flags, environmental variables or policies/ignore files. There can be cases where a specific config can lead to a vulnerability being filtered. Here are some examples:</p>
<ul>
<li><strong>Severity</strong> : if this is set to LOW/MEDIUM, any CVE rated outside of that will be dropped</li>
<li><strong>Fix status</strong>: drops findings Ubuntu has no fix for</li>
<li><strong>.trivyignore</strong>: drops any CVE listed in the file</li>
<li><strong>Repo policy</strong>: drops findings that match rules defined here</li>
<li><strong>VEX</strong>: drops findings marked as <code>not_affected</code></li>
<li><strong>Skip dirs</strong>: if the location of the pkg DB is defined here, all pkgs will become invisible to Trivy</li>
</ul>
<p>Here’s what each looks like in practice:</p>
<pre><code class="hljs language-bash"><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># holds: default scan, every severity</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c7-holds | jq -r <span class="hljs-string">&#x27;.Results[].Vulnerabilities[]? | select(.VulnerabilityID==&quot;CVE-2026-109618&quot;) | .Severity&#x27;</span> | <span class="hljs-built_in">sort</span> -u</span><span class="line"><span class="hljs-output">CRITICAL</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json php2shell:c7-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">4</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-comment"># broken: same image, scan settings filter it out</span></span><span class="line"><span class="hljs-prompt">$</span> trivy image -q -f json --severity LOW,MEDIUM php2shell:c7-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span><span class="line"><span class="hljs-prompt">$</span> docker run --<span class="hljs-built_in">rm</span> -e TRIVY_SEVERITY=LOW,MEDIUM -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy:0.76.1 image -q -f json php2shell:c7-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span><span class="line"><span class="hljs-prompt">$</span> <span class="hljs-built_in">cat</span> scenarios/c7-filters/.trivyignore</span><span class="line"><span class="hljs-output">CVE-2026-109618</span></span><span class="line"><span class="hljs-prompt">$</span> docker run --<span class="hljs-built_in">rm</span> -v <span class="hljs-string">&quot;<span class="hljs-variable">$PWD</span>/scenarios/c7-filters/.trivyignore:/.trivyignore&quot;</span> -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy:0.76.1 image -q -f json --ignorefile /.trivyignore php2shell:c7-holds | grep -c <span class="hljs-string">&#x27;&quot;VulnerabilityID&quot;: &quot;CVE-2026-109618&quot;&#x27;</span></span><span class="line"><span class="hljs-output">0</span></span>
</code></pre><p>If all these conditions are met, then Trivy will be able to effectively evaluate the vulnerability status of a package.</p>
<p>Want to see it for yourself? The full lab is on GitHub: <a href="https://github.com/perplexedyawdie/detecting-php2shell-with-trivy">detecting-php2shell-with-trivy</a>. Spin it up and try each scenario in a real environment.</p>
]]></content:encoded>
  </item>
</channel>
</rss>
