DEV Community

Cover image for VEX explained: not every vulnerability applies to you
Werner Dijkerman for ArtefactFlow

Posted on Originally published at artefactflow.com

VEX explained: not every vulnerability applies to you

You run a scanner against a release and it lights up: 200 known vulnerabilities. Panic sets in, until you start digging and realise most of them don't actually affect you. The vulnerable function is never called. The affected code path is disabled. The component ships but isn't reachable. So how do you say "we looked, and this one doesn't apply" in a way a customer, an auditor, or the next engineer on your team can inspect?

That's what VEX is for.

Why this usually lands on your desk

Very few teams take up VEX because they enjoy the file format. The trigger is almost always someone outside the team:

  • a customer's security group runs its own scanner against your image and sends the results back as a question
  • a procurement or vendor review asks what you are doing about a named CVE
  • an auditor wants evidence that findings were assessed rather than ignored
  • your own release gate blocks on a finding nobody has looked at yet

Those are the same question asked by four different parties, and answering it from scratch each time is what costs real money. The engineer who worked out in March that a CVE is not reachable should not have to work it out again in June for a different customer. VEX is what makes that answer reusable, and reuse is the difference between a recurring interruption and a one-off cost.

Three questions, not one

A vulnerability report is easy to misread because three different questions get collapsed into one list.

  • An SBOM (Software Bill of Materials) answers what is in this artefact: the libraries, versions, and suppliers that make up the release.
  • A scanner answers which of those components have known CVEs. It matches versions against a vulnerability database. That is presence, not impact.
  • VEX (Vulnerability Exploitability eXchange) answers does that CVE actually matter in this product, this version, this configuration.

The scanner is not wrong when it flags a CVE in a library you ship. It is incomplete. VEX is the missing layer: a structured, machine-readable statement of exploitability that travels with the artefact instead of living in someone's head or a closed ticket.

What VEX actually is

VEX is a companion to your SBOM, not a replacement for it and not a scanner of its own. Where the SBOM says what's in the software, VEX says whether a given vulnerability actually affects it. If you want the other half of that pair first, see what actually goes in a CycloneDX 1.7 SBOM.

It is a concept first, a file format second. The same idea is implemented in CSAF VEX, CycloneDX VEX, OpenVEX, and related SPDX security fields. You pick the format your toolchain already speaks. What matters is that each statement binds four things together:

  1. a product (or artefact version)
  2. a vulnerability (usually a CVE)
  3. a status
  4. enough context that someone else can judge the claim

A VEX document is a container of those statements. One document can cover many CVEs, or many product versions, but each statement is still one status for one vulnerability in one product context.

That last part is why VEX can be automated. A PDF in a ticket does not scale. A statement with a coded status and a coded reason can be ingested by scanners, customer portals, and your own vulnerability view.

A walkthrough

Take checkout-service 1.4.2. Its bill of materials includes a JOSE library, and a scanner flags CVE-2024-28180: improper handling of compressed JWE content, which can be turned into resource exhaustion. Medium severity, and a real bug.

On the day it lands, the honest status is under investigation. You have acknowledged the finding; you have not finished the analysis.

After review the picture is clearer. The library is present, and the vulnerable path is the one that decrypts compressed JWE payloads. The service only verifies signed tokens; it never decrypts a JWE at all. The status becomes not affected, with the justification vulnerable code not in execute path and a one-line impact statement: signed tokens only; the affected decompression path is never entered.

Sitting next to it in the same list is CVE-2023-44487, HTTP/2 Rapid Reset, and that one is still under investigation, because whether the service is reachable that way depends on the ingress in front of it and nobody has finished checking. Two findings on one version, two different and equally honest answers, on the same afternoon.

If 1.4.3 upgrades the JOSE library past the fixed range, CVE-2024-28180 becomes fixed. If the analysis had shown that decompression path was reachable, it would have been affected, with a recommended action: upgrade, configuration change, or compensating control.

One CVE, four possible honest answers, depending on the artefact and the date. That is the whole point.

The Vulnerabilities tab of checkout-service 1.4.2: CVE-2023-44487 still in triage, CVE-2024-28180 recorded as not affected

The Vulnerabilities tab of checkout-service 1.4.2: CVE-2023-44487 still in triage, CVE-2024-28180 recorded as not affected.

The core statuses

For each vulnerability against each product version, VEX records one of a small set of statuses:

  • Not affected: the vulnerability is associated with a component you ship, but it cannot be exploited here. No remediation is required for this artefact. Always say why.
  • Affected: it does apply. Action is needed, and the statement should say what that action is.
  • Fixed: this version already contains the remediation.
  • Under investigation: you are still assessing. Publish this rather than going silent; then replace it when the analysis lands.

The "not affected" status is the one that earns its keep. It is the difference between a scanner's raw noise and a considered security position. "Affected" matters just as much to anyone downstream: it is how you admit a problem and point at the fix instead of hoping the finding disappears.

Why "not affected" needs a reason

Anyone can claim a vulnerability doesn't apply. VEX asks you to say why, using a small set of standard justifications so tools and auditors don't have to parse a paragraph of prose.

The CISA set looks like this:

  • Component not present: the scanner associated a component that is not actually in this product.
  • Vulnerable code not present: the package is there, but the vulnerable code was stripped, not compiled in, or tree-shaken out.
  • Vulnerable code not in execute path: the code exists in the artefact, but this product never calls it.
  • Vulnerable code cannot be controlled by an adversary: the code runs, but attacker-controlled input cannot reach the vulnerable behaviour.
  • Inline mitigations already exist: the product itself blocks exploitation, and that protection cannot be switched off by the user.

A free-text "doesn't apply" with no justification is a ticket comment, not VEX. The coded reason is what makes the assessment reusable. The short human impact statement next to it is what makes it reviewable.

The analysis dialog for CVE-2024-28180 on checkout-service 1.4.2, showing the not_affected state alongside its code_not_reachable justification and the impact note

The analysis dialog for CVE-2024-28180 on checkout-service 1.4.2, showing the not_affected state alongside its code_not_reachable justification and the impact note.

Two things VEX is not:

  • It is not the same as a false positive. A false positive means the CVE was never in that component. "Not affected" often means the CVE is in a component you ship, but it is not exploitable here.
  • It is not proof. A VEX statement is an assertion by its author. Consumers can accept it, reject it, or treat "inline mitigations" more sceptically than "component not present." Author, timestamp, and a recorded reason are what make the assertion usable.

VEX changes faster than the SBOM

The SBOM for a given artefact version is relatively stable: it changes when the contents of the release change. VEX changes whenever analysis completes, a new CVE drops, or a fix ships.

That is why VEX is often kept as a companion document linked to the artefact, rather than frozen inside the SBOM at build time. Embedding the assessment in the BOM is convenient; it also goes stale the moment the next advisory is published.

Practical workflow:

  1. Produce or ingest an SBOM for the artefact version.
  2. Correlate known vulnerabilities.
  3. Default new matches to under investigation.
  4. Analyse reachability, build flags, configuration, and mitigations.
  5. Record status, justification, owner, and date.
  6. Attach that assessment to the artefact version.
  7. Revisit it when a new CVE hits the same component, or when the next version ships.

Only steps 4 and 5 need a person, and that person is usually the team that owns the service rather than a central security group: they are the ones who know whether the code path is live. Security reviews the decision instead of making every one of them. The work also does not repeat. While the component and the code path around it are unchanged, the previous assessment carries forward, so what you actually pay for is new components and genuinely new advisories.

An assessment for libfoo 1.2 in app 3.1 does not automatically apply to app 3.2. Dependencies move. Call graphs change. The unit of record is the artefact version.

How ArtefactFlow handles it

ArtefactFlow tracks vulnerabilities per artefact version, and every finding carries its own analysis. New findings start as in_triage, then move to exploitable, not_affected (paired with a justification such as code_not_reachable), resolved or false_positive as you work through them. Those are the CycloneDX names for the same honest answers described above, plus an explicit slot for a finding that was reported in error. The CISA justifications map onto CycloneDX ones as well, with one gap: CycloneDX has no equivalent for vulnerable code cannot be controlled by an adversary. An OpenVEX statement giving that reason is still recorded as not_affected, without a coded justification, and its original wording is kept in the analysis detail so the reasoning is not lost.

You do not have to enter those decisions one at a time, either. When a pipeline uploads its scanner's report, it can send a VEX document along with it, CycloneDX VEX or OpenVEX (what vexctl and govulncheck -format openvex write), and each assessment is laid over the matching finding by vulnerability id or alias. An assessment that matches nothing in the report is listed back rather than silently dropped, which is usually a sign that the scan and the VEX describe different builds.

The assessment is part of the artefact record. The next person to look does not have to redo the analysis from Slack history. Customers and auditors can be shown the same statement your team used, rather than a screenshot of a triage board, and every change to an assessment lands in the audit trail.

It also changes the numbers you act on. A version's risk score is built from what is exploitable, not from what a scanner matched: a CVE marked not_affected still shows up in the raw severity counts and drops out of the exploitable ones. A vex_required policy takes that a step further and holds a release until every finding at or above a chosen severity has a documented decision, so "we will triage it later" cannot quietly ship.

Assessments are not only recorded finding by finding. A whole VEX document can be attached to an SBOM version, each statement pointing at the component it judges. Attaching a new document archives the previous one rather than overwriting it, so the history of what you claimed, and when, stays intact. A CycloneDX VEX document you produced elsewhere is stored verbatim next to it, and can be exported when a customer wants the file rather than a screenshot. The export is itself recorded as an audit event, which is usually the detail an auditor asks about second.

The same records answer the question you get during an incident. You can search every VEX decision your organisation has made for a given CVE, or ask which released versions contain it at all and which of those you have already ruled out. Re-enriching a version refreshes its vulnerabilities from current advisories, so discovering that a two-year-old release is newly affected does not mean rebuilding or re-scanning it.

Findings left in triage stay visible until someone closes the loop. That stops the junk drawer problem: findings that were "looked at" once and then became folklore.

The payoff

VEX turns vulnerability management from a recurring fire drill into a durable, defensible position. You do the analysis once, record it where it belongs, and everyone downstream (your security team, your auditors, your customers) sees the same honest answer.

You will still patch what is reachable. You will still investigate what is new. You just stop treating every scanner row as an incident.

ArtefactFlow keeps each assessment on the artefact version it belongs to, so the answer you worked out in March is still there in June, for the next engineer and for the customer who asks. Read the vulnerabilities guide

Originally published on the ArtefactFlow blog.

Top comments (0)