What CPE is - and why FreeBSD now follows the standard
Insight · 24 November 2026 · OTTRIA
What CPE is #
An SBOM is only useful if every component listed in it can be matched to a vulnerability report. That does not require a CPE: tools such as Syft read the name, version, and origin from the package database and build their own identifiers from them. This is the usual route, and it works.
But the name of a package is not the same as the product identifier under which a vulnerability was reported. Getting from one to the other means deriving — and a derivation from the name is not unambiguous.
That product identifier is precisely what CPE is, the Common Platform Enumeration. It is standardised and consists of vendor, product, version, and eight further attributes. The NVD files its reports under this key.
In FreeBSD, the CPE does not have to be derived. It is declared in the port. Whoever maintains a program for FreeBSD maintains the CPE there alongside the rest of the metadata. On installation it is written into the package database as an annotation.
The standard comes from the US NIST and is freely available. The structure of the identifier is defined in NISTIR 7695, and the corresponding validation schema sits beside it as an XSD. The current version is 2.3. Its predecessor 2.2 has been superseded, and its specification document is no longer even available.
What was wrong in the FreeBSD ports tree #
FreeBSD embeds the CPE identifier into the built package as an annotation. That support was created in 2014, still under CPE 2.2, and was switched to 2.3 in the same year. In that switch, the handling of empty values stayed as it was.
The cause was the standard itself. Its prose suggests that attributes without a value may be left empty. The formal grammar in the same document, however, requires a value for every attribute: where no concrete one exists, an asterisk belongs there, meaning "any". The standard mentions this option but does not explicitly prescribe it — and under CPE 2.2 the shorter form was still permitted.
We checked the output of all 3,360 ports carrying a CPE against the official validation schema and reported the result to Dag-Erling Smørgrav, who maintains the framework. Together we worked through the ambiguous passages of the standard and used the actual CPE dictionary to establish which reading the authors are likely to have intended. The fix is his — including the merge to quarterly. That is the branch from which FreeBSD's official binary packages are built. Together with the rebuild of the affected packages, the corrected identifier therefore also reaches every system that installs ready-made packages instead of building its own — which is most of them.
What this means for your SBOM #
The fact that the other routes to matching still work does not make a malformed CPE harmless. If a validation tool does not accept the identifier as conformant, that tool alone decides what happens next: some are lenient and work with it anyway, others discard the value silently. In both cases you only see the result in the report, never the discarded line — and what remains is the derivation from the package name, which is exactly the uncertainty the declared identifier was meant to avoid.
For FreeBSD-based systems this source of error is closed. The identifiers now come out of the package database in conformant form. An SBOM generated from them can rely on a maintained value at this point instead of on a derivation.