Vector String Format
A CVSS vector string is a compact, machine-readable text representation of the metric values selected for a vulnerability. Both the full browser calculator and the MCP server (cvss-calculator-mcp) validate vectors against the official FIRST specifications.
Structure by Version
CVSS v4.0
- Prefix:
CVSS:4.0/ - Mandatory Base order (11 metrics):
AV, AC, AT, PR, UI, VC, VI, VA, SC, SI, SA - Optional Threat order:
E - Optional Environmental order:
CR, IR, AR, MAV, MAC, MAT, MPR, MUI, MVC, MVI, MVA, MSC, MSI, MSA - Optional Supplemental order:
S, AU, R, V, RE, U - Canonical Serialization Rule: Mandatory Base metrics are always present in exact order. Optional metrics set to
X(Not Defined) are omitted from the serialized canonical vector string.
Example canonical v4.0 vector:
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/CR:H/MAV:A/S:P/AU:Y/U:RedCVSS v3.1 and v3.0
- Prefix:
CVSS:3.1/orCVSS:3.0/ - Mandatory Base order (8 metrics):
AV, AC, PR, UI, S, C, I, A - Optional Temporal order:
E, RL, RC - Optional Environmental order:
CR, IR, AR, MAV, MAC, MPR, MUI, MS, MC, MI, MA - Canonical Serialization Rule: Mandatory Base metrics are always emitted; optional metrics with value
Xare omitted.
Example canonical v3.1 vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:F/RL:O/RC:CCVSS v2.0
- Prefix: None. (Parentheses around the vector such as
(AV:N/AC:L/Au:N/C:P/I:P/A:P)are accepted by the parser and normalized to bareAV:N/...format.) - Mandatory Base order (6 metrics):
AV, AC, Au, C, I, A - Optional Temporal order:
E, RL, RC - Optional Environmental order:
CDP, TD, CR, IR, AR - Canonical Serialization Rule: Mandatory Base metrics are always emitted; optional metrics with value
NDare omitted.
Example canonical v2.0 vector:
AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:CValidation Errors Caught by the Parser
Our parser rejects malformed vectors with explicit, actionable error messages:
- Unrecognized or missing version prefix: e.g.,
CVSS:5.0/...or missingAV:in v2.0. - Duplicate metric keys: e.g., specifying
AV:NandAV:Lin the same string. - Unknown metric abbreviation: e.g., using
Auinside a v3.1 vector orSinside a v2.0 vector. - Invalid metric value: e.g.,
AV:Xon a mandatory Base metric orUI:Rin a v4.0 vector (where v4.0 usesUI:PorUI:A). - Incomplete Base group: Any vector missing one or more mandatory Base metrics for its version.