CPE parser and converter
Split a CPE 2.3 formatted string or a CPE 2.2 URI into vendor, product, version and its other fields, and convert between the two formats by NISTIR 7695.
A 2.3 formatted string (cpe:2.3:…) or a 2.2 URI (cpe:/…).
Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.
How to use the CPE parser and converter
- Paste a CPE name that starts with cpe:2.3: or cpe:/, or load an example.
- Read the eleven fields: part, vendor, product, version and the rest.
- Copy the 2.3 formatted string or the 2.2 URI, whichever your tool needs.
About this tool
CPE, the Common Platform Enumeration, is the naming scheme the National Vulnerability Database uses to say which products a CVE affects. A name such as cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:* reads: an application (a), from the vendor apache, the product log4j, version 2.14.1, with every other field left open. The part is a for applications, o for operating systems and h for hardware.
There are two written forms. The 2.3 formatted string always has eleven fields after cpe:2.3:, where * means any value and - means not applicable. The older 2.2 URI, cpe:/a:apache:log4j:2.14.1, has seven fields, drops the empty ones at the end, and percent-encodes special characters. The four fields that 2.3 added are packed into the edition field of a URI, separated by ~ signs.
This tool reads either form, shows the fields, and writes both forms by the binding rules of NISTIR 7695. The frequent mistakes are counting fields wrongly, confusing * with -, and leaving special characters unquoted: in a 2.3 string a literal colon or asterisk needs a backslash. Remember that matching a CPE to an open-source package is guesswork; a purl identifies a package more reliably.
Sources
Questions
An asterisk is ANY: the field is not restricted, so the name matches every value there. A hyphen is NA, not applicable: the field has no value for this product, for example no update level. They are different in matching, so do not swap one for the other.
CPE 2.2 defined the URI form with seven fields. CPE 2.3 added four fields (software edition, target software, target hardware and other), wildcards inside values, and the formatted string. The NVD publishes 2.3 strings; some older tools and feeds still use 2.2 URIs.
Search the official CPE dictionary of the NVD by vendor or product name. Do not build the name by guessing: vendors and products are often spelled in ways you would not expect, and a CPE that is not in the dictionary matches nothing.
The specification asks for lower case so that names can be compared as strings. This tool lower-cases its input and tells you when it did. Upper-case letters in a pasted CPE usually mean it was typed by hand.