From c1d8cd5a183060cc6a3aa79aa1c1b3665b691e8f Mon Sep 17 00:00:00 2001 From: ccoffin Date: Mon, 16 Sep 2024 16:33:12 -0500 Subject: [PATCH 01/19] Add cpeApplicability block based on NIST NVD CVE API v2.0 configurations block --- schema/CVE_Record_Format.json | 93 +++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index f74450c32c..642b7bc656 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -487,6 +487,87 @@ "required": ["orgId"], "additionalProperties": false }, + "cpeApplicability": { + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_node" + } + } + }, + "required": [ + "nodes" + ] + }, + "cpe_node": { + "description": "Defines a CPE configuration node in an applicability statement.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "cpeMatch": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_match" + } + } + }, + "required": [ + "operator", + "cpeMatch" + ] + }, + "cpe_match": { + "description": "CPE match string or range", + "type": "object", + "properties": { + "vulnerable": { + "type": "boolean" + }, + "criteria": { + "type": "string" + }, + "matchCriteriaId": { + "type": "string", + "format": "uuid" + }, + "versionStartExcluding": { + "type": "string" + }, + "versionStartIncluding": { + "type": "string" + }, + "versionEndExcluding": { + "type": "string" + }, + "versionEndIncluding": { + "type": "string" + } + }, + "required": [ + "vulnerable", + "criteria", + ], + "additionalProperties": false + }, "cnaPublishedContainer": { "description": "An object containing the vulnerability information provided by a CVE Numbering Authority (CNA) for a published CVE ID. There can only be one CNA container per CVE record since there can only be one assigning CNA. The CNA container must include the required information defined in the CVE Rules, which includes a product, version, problem type, prose description, and a reference.", "type": "object", @@ -514,6 +595,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicability" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, @@ -620,6 +707,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicability" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, From bd13ba390facc67f910720da5185d68412017882 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 17 Sep 2024 13:44:15 -0500 Subject: [PATCH 02/19] created a shared definition for cpeId and referenced from cpes array and cpeMatch. Referenced shared uuidType and version definitions within cpeMatch. --- schema/CVE_Record_Format.json | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index 642b7bc656..dde2e770d1 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -53,6 +53,13 @@ "type": "string", "pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$" }, + "cpeId": { + "type": "string", + "description":"Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", + "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, "orgId": { "description": "A UUID for an organization participating in the CVE program. This UUID can be used to lookup the organization record in the user registry service.", "$ref": "#/definitions/uuidType" @@ -196,15 +203,12 @@ }, "cpes": { "type": "array", - "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.", + "description": "NOTE: Use newer cpeApplicability block for defining CPE data using the CPE Applicability Language. Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.", "uniqueItems": true, "items": { "title": "CPE Name", - "type": "string", "description":"Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", - "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", - "minLength": 1, - "maxLength": 2048 + "$ref": "#/definitions/cpeId" } }, "modules": { @@ -543,23 +547,22 @@ "type": "boolean" }, "criteria": { - "type": "string" + "$ref": "#/definitions/cpeId" }, "matchCriteriaId": { - "type": "string", - "format": "uuid" + "$ref": "#/definitions/uuidType" }, "versionStartExcluding": { - "type": "string" + "$ref": "#/definitions/version" }, "versionStartIncluding": { - "type": "string" + "$ref": "#/definitions/version" }, "versionEndExcluding": { - "type": "string" + "$ref": "#/definitions/version" }, "versionEndIncluding": { - "type": "string" + "$ref": "#/definitions/version" } }, "required": [ From e339e8fa0671cfcbbceb26af049147299f823122 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 17 Sep 2024 15:59:41 -0500 Subject: [PATCH 03/19] removed array from cpeApplicability in both cna and adp. removed stray comma and fixed whitespace issue. --- schema/CVE_Record_Format.json | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index dde2e770d1..53fb8ce9c3 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -53,7 +53,7 @@ "type": "string", "pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$" }, - "cpeId": { + "cpeId": { "type": "string", "description":"Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", @@ -567,7 +567,7 @@ }, "required": [ "vulnerable", - "criteria", + "criteria" ], "additionalProperties": false }, @@ -599,10 +599,7 @@ "$ref": "#/definitions/affected" }, "cpeApplicability": { - "type": "array", - "items": { - "$ref": "#/definitions/cpeApplicability" - } + "$ref": "#/definitions/cpeApplicability" }, "problemTypes": { "$ref": "#/definitions/problemTypes" @@ -711,10 +708,7 @@ "$ref": "#/definitions/affected" }, "cpeApplicability": { - "type": "array", - "items": { - "$ref": "#/definitions/cpeApplicability" - } + "$ref": "#/definitions/cpeApplicability" }, "problemTypes": { "$ref": "#/definitions/problemTypes" From 17f9295ef6a4559ad9a35a190fa86a1a34702b30 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Wed, 18 Sep 2024 06:58:40 -0500 Subject: [PATCH 04/19] added array back to cpeApplicability as some NVD Records use it. Renamed cpeApplicability definition to cpeApplicabilityElement. --- schema/CVE_Record_Format.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index 53fb8ce9c3..356a8442ef 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -491,7 +491,7 @@ "required": ["orgId"], "additionalProperties": false }, - "cpeApplicability": { + "cpeApplicabilityElement": { "properties": { "operator": { "type": "string", @@ -599,7 +599,10 @@ "$ref": "#/definitions/affected" }, "cpeApplicability": { - "$ref": "#/definitions/cpeApplicability" + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } }, "problemTypes": { "$ref": "#/definitions/problemTypes" @@ -708,7 +711,10 @@ "$ref": "#/definitions/affected" }, "cpeApplicability": { - "$ref": "#/definitions/cpeApplicability" + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } }, "problemTypes": { "$ref": "#/definitions/problemTypes" From 88a44e00a034488796b416b062ab1a92f326f6f3 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Fri, 27 Sep 2024 13:14:09 -0500 Subject: [PATCH 05/19] added new cpe23 definition for use with new cpeApplicability block which supports only CPE 2.3 format. renamed old cpeId definition to cpe22and23 which is referenced by cpes array and supports both CPE 2.2 and 2.3. --- schema/CVE_Record_Format.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index 356a8442ef..25c0debbf0 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -53,13 +53,20 @@ "type": "string", "pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$" }, - "cpeId": { + "cpe22and23": { "type": "string", "description":"Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", "minLength": 1, "maxLength": 2048 }, + "cpe23": { + "type": "string", + "description":"Common Platform Enumeration (CPE) Name in 2.3 format", + "pattern": "(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, "orgId": { "description": "A UUID for an organization participating in the CVE program. This UUID can be used to lookup the organization record in the user registry service.", "$ref": "#/definitions/uuidType" @@ -208,7 +215,7 @@ "items": { "title": "CPE Name", "description":"Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", - "$ref": "#/definitions/cpeId" + "$ref": "#/definitions/cpe22and23" } }, "modules": { @@ -547,7 +554,7 @@ "type": "boolean" }, "criteria": { - "$ref": "#/definitions/cpeId" + "$ref": "#/definitions/cpe23" }, "matchCriteriaId": { "$ref": "#/definitions/uuidType" From 114a95862db86fc822e751f1e706a44672062926 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Thu, 3 Oct 2024 14:50:44 -0500 Subject: [PATCH 06/19] changed all example files to use CVE-1900-xxxx instead of CVE-1337-xxxx. --- schema/docs/cnaContainer-advanced-example.json | 2 +- schema/docs/cnaContainer-basic-example.json | 2 +- schema/docs/full-record-advanced-example.json | 4 ++-- schema/docs/full-record-basic-example.json | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/schema/docs/cnaContainer-advanced-example.json b/schema/docs/cnaContainer-advanced-example.json index c255d81b33..e0236ca75d 100644 --- a/schema/docs/cnaContainer-advanced-example.json +++ b/schema/docs/cnaContainer-advanced-example.json @@ -250,7 +250,7 @@ ], "references": [ { - "url": "https://example.org/ESA-22-11-CVE-1337-1234", + "url": "https://example.org/ESA-22-11-CVE-1900-1234", "name": "ESA-22-11", "tags": [ "vendor-advisory" diff --git a/schema/docs/cnaContainer-basic-example.json b/schema/docs/cnaContainer-basic-example.json index 0b474d3e5f..04ca59c65f 100644 --- a/schema/docs/cnaContainer-basic-example.json +++ b/schema/docs/cnaContainer-basic-example.json @@ -36,7 +36,7 @@ ], "references": [ { - "url": "https://example.org/ESA-22-11-CVE-1337-1234" + "url": "https://example.org/ESA-22-11-CVE-1900-1234" } ] } diff --git a/schema/docs/full-record-advanced-example.json b/schema/docs/full-record-advanced-example.json index da1532278c..acc8a0d577 100644 --- a/schema/docs/full-record-advanced-example.json +++ b/schema/docs/full-record-advanced-example.json @@ -2,7 +2,7 @@ "dataType": "CVE_RECORD", "dataVersion": "5.1", "cveMetadata": { - "cveId": "CVE-1337-1234", + "cveId": "CVE-1900-1234", "assignerOrgId": "b3476cb9-2e3d-41a6-98d0-0f47421a65b6", "assignerShortName": "example", "requesterUserId": "b3476cb9-2e3d-41a6-98d0-0f47421a65b6", @@ -263,7 +263,7 @@ ], "references": [ { - "url": "https://example.org/ESA-22-11-CVE-1337-1234", + "url": "https://example.org/ESA-22-11-CVE-1900-1234", "name": "ESA-22-11", "tags": [ "vendor-advisory" diff --git a/schema/docs/full-record-basic-example.json b/schema/docs/full-record-basic-example.json index b1c3f5eaac..55e0b655a3 100644 --- a/schema/docs/full-record-basic-example.json +++ b/schema/docs/full-record-basic-example.json @@ -2,7 +2,7 @@ "dataType": "CVE_RECORD", "dataVersion": "5.1", "cveMetadata": { - "cveId": "CVE-1337-1234", + "cveId": "CVE-1900-1234", "assignerOrgId": "b3476cb9-2e3d-41a6-98d0-0f47421a65b6", "state": "PUBLISHED" }, @@ -44,7 +44,7 @@ ], "references": [ { - "url": "https://example.org/ESA-22-11-CVE-1337-1234" + "url": "https://example.org/ESA-22-11-CVE-1900-1234" } ] } From 9b19c1c1a7d6ee5626fcf5f1b880292c4a665f18 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Mon, 7 Oct 2024 13:21:32 -0500 Subject: [PATCH 07/19] Update CVE_Record_Format_bundled.json file name. This had accidentally been named CVE_Record_Format.json. --- schema/support/schema2markmap/schema-bundle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema/support/schema2markmap/schema-bundle.js b/schema/support/schema2markmap/schema-bundle.js index 7409ce807b..594ce86752 100644 --- a/schema/support/schema2markmap/schema-bundle.js +++ b/schema/support/schema2markmap/schema-bundle.js @@ -23,13 +23,13 @@ async function schemaBundle() { delete metricProperties.cvssV2_0.license; - fs.writeFile(`${dirName}/CVE_Record_Format.json`, + fs.writeFile(`${dirName}/CVE_Record_Format_bundled.json`, JSON.stringify(cveSchemaBundle, null, 2), err => { if(err) throw err; else - console.log('CVE_Record_Format.json created'); + console.log('CVE_Record_Format_bundled.json created'); } ); From e20ef083e406ce7f5669bf67cc010e29a77f4f36 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Thu, 10 Oct 2024 11:40:24 -0500 Subject: [PATCH 08/19] added a description to cpeApplicabilityElement --- schema/CVE_Record_Format.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index 25c0debbf0..3b7571f3e5 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -210,7 +210,7 @@ }, "cpes": { "type": "array", - "description": "NOTE: Use newer cpeApplicability block for defining CPE data using the CPE Applicability Language. Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.", + "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here. NOTE: Consider using the newer cpeApplicability block for defining CPE data using the CPE Applicability Language which includes more options for defining CPE Names.", "uniqueItems": true, "items": { "title": "CPE Name", @@ -499,6 +499,7 @@ "additionalProperties": false }, "cpeApplicabilityElement": { + "description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.", "properties": { "operator": { "type": "string", From acd59ed1c9f696de85e5f73f3016f7dfa53f1823 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Thu, 10 Oct 2024 14:37:01 -0500 Subject: [PATCH 09/19] added cpe example in the full-record-advanced-example.json file --- schema/docs/full-record-advanced-example.json | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/schema/docs/full-record-advanced-example.json b/schema/docs/full-record-advanced-example.json index da1532278c..d6aaeb3960 100644 --- a/schema/docs/full-record-advanced-example.json +++ b/schema/docs/full-record-advanced-example.json @@ -96,6 +96,57 @@ ], "defaultStatus": "unaffected" } + ], + "cpeApplicability": [ + { + "nodes": [ + { + "operator": "OR", + "negate": false, + "cpeMatch": [ + { + "vulnerable": true, + "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", + "versionStartIncluding": "1.0.0", + "versionEndExcluding": "1.0.6" + }, + { + "vulnerable": true, + "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", + "versionStartIncluding": "2.1.6", + "versionEndExcluding": "2.1.9" + } + ] + } + ] + }, + { + "operator": "AND", + "nodes": [ + { + "operator": "OR", + "negate": false, + "cpeMatch": [ + { + "vulnerable": false, + "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", + "versionStartIncluding": "2.1.0", + "versionEndExcluding": "2.1.6" + }, + { + "vulnerable": false, + "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", + "versionStartIncluding": "2.1.9" + }, + { + "vulnerable": false, + "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", + "versionStartIncluding": "3.0.0" + } + ] + } + ] + } ], "descriptions": [ { From dde2d4932adefc306ed61a443a406b950c68c71b Mon Sep 17 00:00:00 2001 From: ccoffin Date: Thu, 10 Oct 2024 14:48:46 -0500 Subject: [PATCH 10/19] fix indent in full-record-advanced-example.json file --- schema/docs/full-record-advanced-example.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/schema/docs/full-record-advanced-example.json b/schema/docs/full-record-advanced-example.json index d6aaeb3960..b711cb05d8 100644 --- a/schema/docs/full-record-advanced-example.json +++ b/schema/docs/full-record-advanced-example.json @@ -107,13 +107,13 @@ { "vulnerable": true, "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "1.0.0", + "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.0.6" }, { "vulnerable": true, "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "2.1.6", + "versionStartIncluding": "2.1.6", "versionEndExcluding": "2.1.9" } ] @@ -130,18 +130,18 @@ { "vulnerable": false, "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "2.1.0", + "versionStartIncluding": "2.1.0", "versionEndExcluding": "2.1.6" }, { "vulnerable": false, "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "2.1.9" + "versionStartIncluding": "2.1.9" }, { "vulnerable": false, "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "3.0.0" + "versionStartIncluding": "3.0.0" } ] } From 8f3e8f79da5201824a5b538cd6d8c16dc85b2b7b Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 15 Oct 2024 10:49:21 -0500 Subject: [PATCH 11/19] updated full-record-advanced-example.json with more accurate cpeApplicabilty --- schema/docs/full-record-advanced-example.json | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/schema/docs/full-record-advanced-example.json b/schema/docs/full-record-advanced-example.json index b711cb05d8..61c719f32b 100644 --- a/schema/docs/full-record-advanced-example.json +++ b/schema/docs/full-record-advanced-example.json @@ -99,6 +99,7 @@ ], "cpeApplicability": [ { + "operator": "AND", "nodes": [ { "operator": "OR", @@ -106,47 +107,46 @@ "cpeMatch": [ { "vulnerable": true, - "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "1.0.0", + "criteria": "cpe:2.3:a:example_org:example_enterprise:*:*:*:*:*:*:*:*", + "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.0.6" }, { "vulnerable": true, - "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "2.1.6", - "versionEndExcluding": "2.1.9" + "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.6:*:*:*:*:*:*:*" + }, + { + "vulnerable": true, + "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.7:*:*:*:*:*:*:*" + }, + { + "vulnerable": true, + "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.8:*:*:*:*:*:*:*" } ] - } - ] - }, - { - "operator": "AND", - "nodes": [ + }, { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": false, - "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "2.1.0", - "versionEndExcluding": "2.1.6" + "criteria": "cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*", + "matchCriteriaId": "A2572D17-1DE6-457B-99CC-64AFD54487EA" }, { "vulnerable": false, - "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "2.1.9" + "criteria": "cpe:2.3:o:apple:macos:-:*:*:*:*:*:*:*", + "matchCriteriaId": "387021A0-AF36-463C-A605-32EA7DAC172E" }, - { + { "vulnerable": false, - "criteria": "cpe:2.3:a:example_enterprise:Web-Management-Interface:*:*:*:*:*:*:*:*", - "versionStartIncluding": "3.0.0" + "criteria": "cpe:2.3:h:Some_company:xt-4500:*:*:*:*:*:*:*:*" } ] } ] - } + }, ], "descriptions": [ { From 5de5acebe62e306b7edfc70a10960dc4590a4b0f Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 15 Oct 2024 12:38:39 -0500 Subject: [PATCH 12/19] updated full-record-advanced-example.json with more accurate cpeApplicabilty --- schema/docs/full-record-advanced-example.json | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/schema/docs/full-record-advanced-example.json b/schema/docs/full-record-advanced-example.json index 61c719f32b..ea347173ea 100644 --- a/schema/docs/full-record-advanced-example.json +++ b/schema/docs/full-record-advanced-example.json @@ -113,15 +113,9 @@ }, { "vulnerable": true, - "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.6:*:*:*:*:*:*:*" - }, - { - "vulnerable": true, - "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.7:*:*:*:*:*:*:*" - }, - { - "vulnerable": true, - "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.8:*:*:*:*:*:*:*" + "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.6:*:*:*:*:*:*:*", + "versionStartIncluding": "2.1.6", + "versionEndExcluding": "2.1.9" } ] }, @@ -131,17 +125,15 @@ "cpeMatch": [ { "vulnerable": false, - "criteria": "cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*", - "matchCriteriaId": "A2572D17-1DE6-457B-99CC-64AFD54487EA" + "criteria": "cpe:2.3:o:microsoft:windows:*:*:*:*:*:*:*:*" }, { "vulnerable": false, - "criteria": "cpe:2.3:o:apple:macos:-:*:*:*:*:*:*:*", - "matchCriteriaId": "387021A0-AF36-463C-A605-32EA7DAC172E" + "criteria": "cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*" }, { "vulnerable": false, - "criteria": "cpe:2.3:h:Some_company:xt-4500:*:*:*:*:*:*:*:*" + "criteria": "cpe:2.3:h:some_company:xt-4500:*:*:*:*:*:*:*:*" } ] } @@ -151,23 +143,23 @@ "descriptions": [ { "lang": "en", - "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges. This issue affects: 1.0 versions before 1.0.6, 2.1 versions from 2.16 until 2.1.9.", + "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges. This issue affects: 1.0 versions before 1.0.6, 2.1 versions from 2.1.6 until 2.1.9.", "supportingMedia": [ { "type": "text/html", "base64": false, - "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges.

This issue affects:
  • 1.0 versions before 1.0.6
  • 2.1 versions from 2.16 until 2.1.9.
" + "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges.

This issue affects:
  • 1.0 versions before 1.0.6
  • 2.1 versions from 2.1.6 until 2.1.9.
" } ] }, { "lang": "eo", - "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise ĉe Windows, macOS kaj XT-4500 permesas al malproksimaj neaŭtentikigitaj atakantoj eskaladi privilegiojn. Ĉi tiu afero efikas: 1.0-versioj antaŭ 1.0.6, 2.1-versioj de 2.16 ĝis 2.1.9.", + "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise ĉe Windows, macOS kaj XT-4500 permesas al malproksimaj neaŭtentikigitaj atakantoj eskaladi privilegiojn. Ĉi tiu afero efikas: 1.0-versioj antaŭ 1.0.6, 2.1-versioj de 2.1.6 ĝis 2.1.9.", "supportingMedia": [ { "type": "text/html", "base64": false, - "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise ĉe Windows, macOS kaj XT-4500 permesas al malproksimaj neaŭtentikigitaj atakantoj eskaladi privilegiojn.

Ĉi tiu afero efikas:
  • 1.0-versioj antaŭ 1.0.6
  • 2.1-versioj de 2.16 ĝis 2.1.9.
" + "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise ĉe Windows, macOS kaj XT-4500 permesas al malproksimaj neaŭtentikigitaj atakantoj eskaladi privilegiojn.

Ĉi tiu afero efikas:
  • 1.0-versioj antaŭ 1.0.6
  • 2.1-versioj de 2.1.6 ĝis 2.1.9.
" } ] } From 50dae0b9589cd2f62a1de23c728ef5a8ab464a04 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 15 Oct 2024 14:12:38 -0500 Subject: [PATCH 13/19] updated full-record-advanced-example.json with more accurate cpeApplicabilty --- schema/docs/full-record-advanced-example.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schema/docs/full-record-advanced-example.json b/schema/docs/full-record-advanced-example.json index ea347173ea..8574e2d713 100644 --- a/schema/docs/full-record-advanced-example.json +++ b/schema/docs/full-record-advanced-example.json @@ -97,7 +97,7 @@ "defaultStatus": "unaffected" } ], - "cpeApplicability": [ + "cpeApplicability": [ { "operator": "AND", "nodes": [ @@ -113,8 +113,8 @@ }, { "vulnerable": true, - "criteria": "cpe:2.3:a:example_org:example_enterprise:2.1.6:*:*:*:*:*:*:*", - "versionStartIncluding": "2.1.6", + "criteria": "cpe:2.3:a:example_org:example_enterprise:*:*:*:*:*:*:*:*", + "versionStartIncluding": "2.1.6", "versionEndExcluding": "2.1.9" } ] @@ -138,7 +138,7 @@ ] } ] - }, + } ], "descriptions": [ { From 40b11032d58808795147e87b577894f369e4bba9 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Wed, 16 Oct 2024 13:58:56 -0500 Subject: [PATCH 14/19] Update CVE_Record_Format.json Changed data version from 5.1.0 to 5.1.1. --- schema/CVE_Record_Format.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index 3b7571f3e5..aa565e14ef 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -375,7 +375,7 @@ "description": "The version of the CVE schema used for validating this record. Used to support multiple versions of this format.", "type": "string", "pattern": "^5\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?$", - "default": "5.1.0" + "default": "5.1.1" }, "cveMetadataPublished": { "description": "This is meta data about the CVE ID such as the CVE ID, who requested it, who assigned it, when it was requested, the current state (PUBLISHED, REJECTED, etc.) and so on. These fields are controlled by the CVE Services.", From f2a4044816199d6b6f3f396b26ed73a8f7bebc54 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Wed, 16 Oct 2024 14:14:35 -0500 Subject: [PATCH 15/19] Update README.md updated README.md to use 5.1.1 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c1ec1c09f1..e191b53e73 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Current Version of CVE Record Format -Major changes to cve-schema repo architecture!! if you have integrations that rely on the cve-schema repo structure, please review the changes here. The latest version of the CVE JSON Record Format is 5.1.0. A single schema file with bundled dependencies is available [here](https://github.com/CVEProject/cve-schema/blob/master/schema/docs/CVE_Record_Format_bundled.json). +Update to cve-schema to provide better support for CPE!! if you have integrations that rely on the cve-schema repo structure, please review the changes here. The latest version of the CVE JSON Record Format is 5.1.1. A single schema file with bundled dependencies is available [here](https://github.com/CVEProject/cve-schema/blob/master/schema/docs/CVE_Record_Format_bundled.json). Note: The CVE Record Format now supports Authorized Data Publisher (ADP) containers there is one active ADP currently. The CVE Program uses a separate ADP container to provide additional CVE information (e.g., references) for some records. Access this README.md page [here]( https://github.com/CVEProject/cvelistV5/blob/main/README.md) @@ -20,7 +20,7 @@ This CVE Record Format is defined using JSON Schema. Learn more about JSON Schem ### Latest -The latest version of the CVE Record Format is 5.1.0. It is specified in the JSON schema at https://github.com/CVEProject/cve-schema/blob/master/schema/CVE_Record_Format.json +The latest version of the CVE Record Format is 5.1.1. It is specified in the JSON schema at https://github.com/CVEProject/cve-schema/blob/master/schema/CVE_Record_Format.json A single schema file with bundled dependencies is at https://github.com/CVEProject/cve-schema/blob/master/schema/docs/CVE_Record_Format_bundled.json @@ -34,9 +34,9 @@ More details about Product and Version Encodings in the CVE Record Format are at ### Examples -A basic example of a full record in the 5.1.0 format with minimally required fields is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-basic-example.json +A basic example of a full record in the 5.1.1 format with minimally required fields is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-basic-example.json -An advanced example of a full record in the 5.1.0 format is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-advanced-example.json +An advanced example of a full record in the 5.1.1 format is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/full-record-advanced-example.json A basic example of a cnaContainer, to be used with CVE Services, is available at https://github.com/cveproject/cve-schema/blob/master/schema/docs/cnaContainer-basic-example.json From 74551e820b11a3462a1e4395473aeef890f9d94f Mon Sep 17 00:00:00 2001 From: ccoffin Date: Fri, 18 Oct 2024 12:59:36 -0500 Subject: [PATCH 16/19] New bundled CVE Record Format Files --- schema/docs/CVE_Record_Format_bundled.json | 118 ++++++++++++++++- ...VE_Record_Format_bundled_adpContainer.json | 120 ++++++++++++++++-- ..._Format_bundled_cnaPublishedContainer.json | 120 ++++++++++++++++-- ...d_Format_bundled_cnaRejectedContainer.json | 120 ++++++++++++++++-- 4 files changed, 447 insertions(+), 31 deletions(-) diff --git a/schema/docs/CVE_Record_Format_bundled.json b/schema/docs/CVE_Record_Format_bundled.json index 4b8f98b4cf..5fff73a013 100644 --- a/schema/docs/CVE_Record_Format_bundled.json +++ b/schema/docs/CVE_Record_Format_bundled.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled.json", + "$id": "https://cveproject.github.io/cve-schema/schema/CVE_Record_Format.json", "title": "CVE JSON record format", "description": "cve-schema specifies the CVE JSON record format. This is the blueprint for a rich set of JSON data that can be submitted by CVE Numbering Authorities (CNAs) and Authorized Data Publishers (ADPs) to describe a CVE Record. Some examples of CVE Record data include CVE ID number, affected product(s), affected version(s), and public references. While those specific items are required when assigning a CVE, there are many other optional data in the schema that can be used to enrich CVE Records for community benefit. Learn more about the CVE program at [the official website](https://cve.mitre.org). This CVE JSON record format is defined using JSON Schema. Learn more about JSON Schema [here](https://json-schema.org/).", "definitions": { @@ -79,6 +79,20 @@ "type": "string", "pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$" }, + "cpe22and23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", + "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, + "cpe23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in 2.3 format", + "pattern": "(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, "orgId": { "description": "A UUID for an organization participating in the CVE program. This UUID can be used to lookup the organization record in the user registry service.", "$ref": "#/definitions/uuidType" @@ -244,15 +258,12 @@ }, "cpes": { "type": "array", - "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.", + "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here. NOTE: Consider using the newer cpeApplicability block for defining CPE data using the CPE Applicability Language which includes more options for defining CPE Names.", "uniqueItems": true, "items": { "title": "CPE Name", - "type": "string", "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", - "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", - "minLength": 1, - "maxLength": 2048 + "$ref": "#/definitions/cpe22and23" } }, "modules": { @@ -445,7 +456,7 @@ "description": "The version of the CVE schema used for validating this record. Used to support multiple versions of this format.", "type": "string", "pattern": "^5\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?$", - "default": "5.1.0" + "default": "5.1.1" }, "cveMetadataPublished": { "description": "This is meta data about the CVE ID such as the CVE ID, who requested it, who assigned it, when it was requested, the current state (PUBLISHED, REJECTED, etc.) and so on. These fields are controlled by the CVE Services.", @@ -573,6 +584,87 @@ ], "additionalProperties": false }, + "cpeApplicabilityElement": { + "description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_node" + } + } + }, + "required": [ + "nodes" + ] + }, + "cpe_node": { + "description": "Defines a CPE configuration node in an applicability statement.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "cpeMatch": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_match" + } + } + }, + "required": [ + "operator", + "cpeMatch" + ] + }, + "cpe_match": { + "description": "CPE match string or range", + "type": "object", + "properties": { + "vulnerable": { + "type": "boolean" + }, + "criteria": { + "$ref": "#/definitions/cpe23" + }, + "matchCriteriaId": { + "$ref": "#/definitions/uuidType" + }, + "versionStartExcluding": { + "$ref": "#/definitions/version" + }, + "versionStartIncluding": { + "$ref": "#/definitions/version" + }, + "versionEndExcluding": { + "$ref": "#/definitions/version" + }, + "versionEndIncluding": { + "$ref": "#/definitions/version" + } + }, + "required": [ + "vulnerable", + "criteria" + ], + "additionalProperties": false + }, "cnaPublishedContainer": { "description": "An object containing the vulnerability information provided by a CVE Numbering Authority (CNA) for a published CVE ID. There can only be one CNA container per CVE record since there can only be one assigning CNA. The CNA container must include the required information defined in the CVE Rules, which includes a product, version, problem type, prose description, and a reference.", "type": "object", @@ -600,6 +692,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, @@ -706,6 +804,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, diff --git a/schema/docs/CVE_Record_Format_bundled_adpContainer.json b/schema/docs/CVE_Record_Format_bundled_adpContainer.json index c225c381d4..4a3b111577 100644 --- a/schema/docs/CVE_Record_Format_bundled_adpContainer.json +++ b/schema/docs/CVE_Record_Format_bundled_adpContainer.json @@ -1,8 +1,8 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_adpContainer.json", - "title": "CVE JSON adpContainer sub schema", - "description": "CVE JSON adpContainer format", + "title": "CVE Record Format adpContainer sub schema", + "description": "CVE Record Format adpContainer format", "definitions": { "uriType": { "description": "A universal resource identifier (URI), according to [RFC 3986](https://tools.ietf.org/html/rfc3986).", @@ -79,6 +79,20 @@ "type": "string", "pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$" }, + "cpe22and23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", + "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, + "cpe23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in 2.3 format", + "pattern": "(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, "orgId": { "description": "A UUID for an organization participating in the CVE program. This UUID can be used to lookup the organization record in the user registry service.", "$ref": "#/definitions/uuidType" @@ -244,15 +258,12 @@ }, "cpes": { "type": "array", - "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.", + "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here. NOTE: Consider using the newer cpeApplicability block for defining CPE data using the CPE Applicability Language which includes more options for defining CPE Names.", "uniqueItems": true, "items": { "title": "CPE Name", - "type": "string", "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", - "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", - "minLength": 1, - "maxLength": 2048 + "$ref": "#/definitions/cpe22and23" } }, "modules": { @@ -445,7 +456,7 @@ "description": "The version of the CVE schema used for validating this record. Used to support multiple versions of this format.", "type": "string", "pattern": "^5\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?$", - "default": "5.1.0" + "default": "5.1.1" }, "cveMetadataPublished": { "description": "This is meta data about the CVE ID such as the CVE ID, who requested it, who assigned it, when it was requested, the current state (PUBLISHED, REJECTED, etc.) and so on. These fields are controlled by the CVE Services.", @@ -573,6 +584,87 @@ ], "additionalProperties": false }, + "cpeApplicabilityElement": { + "description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_node" + } + } + }, + "required": [ + "nodes" + ] + }, + "cpe_node": { + "description": "Defines a CPE configuration node in an applicability statement.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "cpeMatch": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_match" + } + } + }, + "required": [ + "operator", + "cpeMatch" + ] + }, + "cpe_match": { + "description": "CPE match string or range", + "type": "object", + "properties": { + "vulnerable": { + "type": "boolean" + }, + "criteria": { + "$ref": "#/definitions/cpe23" + }, + "matchCriteriaId": { + "$ref": "#/definitions/uuidType" + }, + "versionStartExcluding": { + "$ref": "#/definitions/version" + }, + "versionStartIncluding": { + "$ref": "#/definitions/version" + }, + "versionEndExcluding": { + "$ref": "#/definitions/version" + }, + "versionEndIncluding": { + "$ref": "#/definitions/version" + } + }, + "required": [ + "vulnerable", + "criteria" + ], + "additionalProperties": false + }, "cnaPublishedContainer": { "description": "An object containing the vulnerability information provided by a CVE Numbering Authority (CNA) for a published CVE ID. There can only be one CNA container per CVE record since there can only be one assigning CNA. The CNA container must include the required information defined in the CVE Rules, which includes a product, version, problem type, prose description, and a reference.", "type": "object", @@ -600,6 +692,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, @@ -706,6 +804,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, diff --git a/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json b/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json index db7dffd02c..6606fcb123 100644 --- a/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json +++ b/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json @@ -1,8 +1,8 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaPublishedContainer.json", - "title": "CVE JSON cnaPublishedContainer sub schema", - "description": "CVE JSON cnaPublishedContainer format", + "title": "CVE Record Format cnaPublishedContainer sub schema", + "description": "CVE Record Format cnaPublishedContainer format", "definitions": { "uriType": { "description": "A universal resource identifier (URI), according to [RFC 3986](https://tools.ietf.org/html/rfc3986).", @@ -79,6 +79,20 @@ "type": "string", "pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$" }, + "cpe22and23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", + "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, + "cpe23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in 2.3 format", + "pattern": "(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, "orgId": { "description": "A UUID for an organization participating in the CVE program. This UUID can be used to lookup the organization record in the user registry service.", "$ref": "#/definitions/uuidType" @@ -244,15 +258,12 @@ }, "cpes": { "type": "array", - "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.", + "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here. NOTE: Consider using the newer cpeApplicability block for defining CPE data using the CPE Applicability Language which includes more options for defining CPE Names.", "uniqueItems": true, "items": { "title": "CPE Name", - "type": "string", "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", - "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", - "minLength": 1, - "maxLength": 2048 + "$ref": "#/definitions/cpe22and23" } }, "modules": { @@ -445,7 +456,7 @@ "description": "The version of the CVE schema used for validating this record. Used to support multiple versions of this format.", "type": "string", "pattern": "^5\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?$", - "default": "5.1.0" + "default": "5.1.1" }, "cveMetadataPublished": { "description": "This is meta data about the CVE ID such as the CVE ID, who requested it, who assigned it, when it was requested, the current state (PUBLISHED, REJECTED, etc.) and so on. These fields are controlled by the CVE Services.", @@ -573,6 +584,87 @@ ], "additionalProperties": false }, + "cpeApplicabilityElement": { + "description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_node" + } + } + }, + "required": [ + "nodes" + ] + }, + "cpe_node": { + "description": "Defines a CPE configuration node in an applicability statement.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "cpeMatch": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_match" + } + } + }, + "required": [ + "operator", + "cpeMatch" + ] + }, + "cpe_match": { + "description": "CPE match string or range", + "type": "object", + "properties": { + "vulnerable": { + "type": "boolean" + }, + "criteria": { + "$ref": "#/definitions/cpe23" + }, + "matchCriteriaId": { + "$ref": "#/definitions/uuidType" + }, + "versionStartExcluding": { + "$ref": "#/definitions/version" + }, + "versionStartIncluding": { + "$ref": "#/definitions/version" + }, + "versionEndExcluding": { + "$ref": "#/definitions/version" + }, + "versionEndIncluding": { + "$ref": "#/definitions/version" + } + }, + "required": [ + "vulnerable", + "criteria" + ], + "additionalProperties": false + }, "cnaPublishedContainer": { "description": "An object containing the vulnerability information provided by a CVE Numbering Authority (CNA) for a published CVE ID. There can only be one CNA container per CVE record since there can only be one assigning CNA. The CNA container must include the required information defined in the CVE Rules, which includes a product, version, problem type, prose description, and a reference.", "type": "object", @@ -600,6 +692,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, @@ -706,6 +804,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, diff --git a/schema/docs/CVE_Record_Format_bundled_cnaRejectedContainer.json b/schema/docs/CVE_Record_Format_bundled_cnaRejectedContainer.json index 7a404c3af0..bfb1d9e476 100644 --- a/schema/docs/CVE_Record_Format_bundled_cnaRejectedContainer.json +++ b/schema/docs/CVE_Record_Format_bundled_cnaRejectedContainer.json @@ -1,8 +1,8 @@ { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://cveproject.github.io/cve-schema/schema/docs/CVE_Record_Format_bundled_cnaRejectedContainer.json", - "title": "CVE JSON cnaRejectedContainer sub schema", - "description": "CVE JSON cnaRejectedContainer format", + "title": "CVE Record Format cnaRejectedContainer sub schema", + "description": "CVE Record Format cnaRejectedContainer format", "definitions": { "uriType": { "description": "A universal resource identifier (URI), according to [RFC 3986](https://tools.ietf.org/html/rfc3986).", @@ -79,6 +79,20 @@ "type": "string", "pattern": "^CVE-[0-9]{4}-[0-9]{4,19}$" }, + "cpe22and23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", + "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, + "cpe23": { + "type": "string", + "description": "Common Platform Enumeration (CPE) Name in 2.3 format", + "pattern": "(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", + "minLength": 1, + "maxLength": 2048 + }, "orgId": { "description": "A UUID for an organization participating in the CVE program. This UUID can be used to lookup the organization record in the user registry service.", "$ref": "#/definitions/uuidType" @@ -244,15 +258,12 @@ }, "cpes": { "type": "array", - "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here.", + "description": "Affected products defined by CPE. This is an array of CPE values (vulnerable and not), we use an array so that we can make multiple statements about the same version and they are separate (if we used a JSON object we'd essentially be keying on the CPE name and they would have to overlap). Also, this allows things like cveDataVersion or cveDescription to be applied directly to the product entry. This also allows more complex statements such as \"Product X between versions 10.2 and 10.8\" to be put in a machine-readable format. As well since multiple statements can be used multiple branches of the same product can be defined here. NOTE: Consider using the newer cpeApplicability block for defining CPE data using the CPE Applicability Language which includes more options for defining CPE Names.", "uniqueItems": true, "items": { "title": "CPE Name", - "type": "string", "description": "Common Platform Enumeration (CPE) Name in either 2.2 or 2.3 format", - "pattern": "([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9._\\-~%]*){0,6})|(cpe:2\\.3:[aho*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-._]|(\\\\[\\\\*?!\"#$%&'()+,/:;<=>@\\[\\]\\^`{|}~]))+(\\?*|\\*?))|[*\\-])){4})", - "minLength": 1, - "maxLength": 2048 + "$ref": "#/definitions/cpe22and23" } }, "modules": { @@ -445,7 +456,7 @@ "description": "The version of the CVE schema used for validating this record. Used to support multiple versions of this format.", "type": "string", "pattern": "^5\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?$", - "default": "5.1.0" + "default": "5.1.1" }, "cveMetadataPublished": { "description": "This is meta data about the CVE ID such as the CVE ID, who requested it, who assigned it, when it was requested, the current state (PUBLISHED, REJECTED, etc.) and so on. These fields are controlled by the CVE Services.", @@ -573,6 +584,87 @@ ], "additionalProperties": false }, + "cpeApplicabilityElement": { + "description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_node" + } + } + }, + "required": [ + "nodes" + ] + }, + "cpe_node": { + "description": "Defines a CPE configuration node in an applicability statement.", + "properties": { + "operator": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "negate": { + "type": "boolean" + }, + "cpeMatch": { + "type": "array", + "items": { + "$ref": "#/definitions/cpe_match" + } + } + }, + "required": [ + "operator", + "cpeMatch" + ] + }, + "cpe_match": { + "description": "CPE match string or range", + "type": "object", + "properties": { + "vulnerable": { + "type": "boolean" + }, + "criteria": { + "$ref": "#/definitions/cpe23" + }, + "matchCriteriaId": { + "$ref": "#/definitions/uuidType" + }, + "versionStartExcluding": { + "$ref": "#/definitions/version" + }, + "versionStartIncluding": { + "$ref": "#/definitions/version" + }, + "versionEndExcluding": { + "$ref": "#/definitions/version" + }, + "versionEndIncluding": { + "$ref": "#/definitions/version" + } + }, + "required": [ + "vulnerable", + "criteria" + ], + "additionalProperties": false + }, "cnaPublishedContainer": { "description": "An object containing the vulnerability information provided by a CVE Numbering Authority (CNA) for a published CVE ID. There can only be one CNA container per CVE record since there can only be one assigning CNA. The CNA container must include the required information defined in the CVE Rules, which includes a product, version, problem type, prose description, and a reference.", "type": "object", @@ -600,6 +692,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, @@ -706,6 +804,12 @@ "affected": { "$ref": "#/definitions/affected" }, + "cpeApplicability": { + "type": "array", + "items": { + "$ref": "#/definitions/cpeApplicabilityElement" + } + }, "problemTypes": { "$ref": "#/definitions/problemTypes" }, From 68146975fb3dae994673783f5e1b00e73c67a012 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 22 Oct 2024 15:19:23 -0500 Subject: [PATCH 17/19] Update full-record-advanced-example.json Fix indent issue --- schema/docs/full-record-advanced-example.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/docs/full-record-advanced-example.json b/schema/docs/full-record-advanced-example.json index 0e7377502a..c4722686c4 100644 --- a/schema/docs/full-record-advanced-example.json +++ b/schema/docs/full-record-advanced-example.json @@ -111,7 +111,7 @@ "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.0.6" }, - { + { "vulnerable": true, "criteria": "cpe:2.3:a:example_org:example_enterprise:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.1.6", From 0fe7a9189f8d4c1e11be06e1d95a96eb2d800870 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 22 Oct 2024 15:21:23 -0500 Subject: [PATCH 18/19] Update CVE_Record_Format.json fix indent issue --- schema/CVE_Record_Format.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/CVE_Record_Format.json b/schema/CVE_Record_Format.json index aa565e14ef..aaf5f5adb7 100644 --- a/schema/CVE_Record_Format.json +++ b/schema/CVE_Record_Format.json @@ -499,7 +499,7 @@ "additionalProperties": false }, "cpeApplicabilityElement": { - "description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.", + "description": "Affected products defined using an implementation of the CPE Applicability Language, mostly copied/forked from the NIST NVD CVE API v2.0 schema (optional). An operator property allows AND or OR logic between CPEs or combinations of CPEs. The negate and vulnerable Boolean properties allow CPEs to be inverted and/or defined as vulnerable or not. Multiple version fields are provided for capturing ranges of products when defining a CPE Match String Range. NOTE: When defining a cpeApplicability block, it is recommended that it align with (as much as possible) the product data provided within the affected block.", "properties": { "operator": { "type": "string", From cc1c0214befc0e2ccfb98c8f4306ec116f65fd34 Mon Sep 17 00:00:00 2001 From: ccoffin Date: Tue, 22 Oct 2024 15:27:50 -0500 Subject: [PATCH 19/19] Update cnaContainer-advanced-example.json Updated to include cpeApplicability example data --- .../docs/cnaContainer-advanced-example.json | 51 +++++++++++++++++-- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/schema/docs/cnaContainer-advanced-example.json b/schema/docs/cnaContainer-advanced-example.json index e0236ca75d..bbafe4b2fb 100644 --- a/schema/docs/cnaContainer-advanced-example.json +++ b/schema/docs/cnaContainer-advanced-example.json @@ -84,26 +84,69 @@ "defaultStatus": "unaffected" } ], + "cpeApplicability": [ + { + "operator": "AND", + "nodes": [ + { + "operator": "OR", + "negate": false, + "cpeMatch": [ + { + "vulnerable": true, + "criteria": "cpe:2.3:a:example_org:example_enterprise:*:*:*:*:*:*:*:*", + "versionStartIncluding": "1.0.0", + "versionEndExcluding": "1.0.6" + }, + { + "vulnerable": true, + "criteria": "cpe:2.3:a:example_org:example_enterprise:*:*:*:*:*:*:*:*", + "versionStartIncluding": "2.1.6", + "versionEndExcluding": "2.1.9" + } + ] + }, + { + "operator": "OR", + "negate": false, + "cpeMatch": [ + { + "vulnerable": false, + "criteria": "cpe:2.3:o:microsoft:windows:*:*:*:*:*:*:*:*" + }, + { + "vulnerable": false, + "criteria": "cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*" + }, + { + "vulnerable": false, + "criteria": "cpe:2.3:h:some_company:xt-4500:*:*:*:*:*:*:*:*" + } + ] + } + ] + } + ], "descriptions": [ { "lang": "en", - "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges. This issue affects: 1.0 versions before 1.0.6, 2.1 versions from 2.16 until 2.1.9.", + "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges. This issue affects: 1.0 versions before 1.0.6, 2.1 versions from 2.1.6 until 2.1.9.", "supportingMedia": [ { "type": "text/html", "base64": false, - "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges.

This issue affects:
  • 1.0 versions before 1.0.6
  • 2.1 versions from 2.16 until 2.1.9.
" + "value": "OS Command Injection vulnerability parseFilename function of example.php in the Web Management Interface of Example.org Example Enterprise on Windows, macOS, and XT-4500 allows remote unauthenticated attackers to escalate privileges.

This issue affects:
  • 1.0 versions before 1.0.6
  • 2.1 versions from 2.1.6 until 2.1.9.
" } ] }, { "lang": "eo", - "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise \u0109e Windows, macOS kaj XT-4500 permesas al malproksimaj nea\u016dtentikigitaj atakantoj eskaladi privilegiojn. \u0108i tiu afero efikas: 1.0-versioj anta\u016d 1.0.6, 2.1-versioj de 2.16 \u011dis 2.1.9.", + "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise \u0109e Windows, macOS kaj XT-4500 permesas al malproksimaj nea\u016dtentikigitaj atakantoj eskaladi privilegiojn. \u0108i tiu afero efikas: 1.0-versioj anta\u016d 1.0.6, 2.1-versioj de 2.1.6 \u011dis 2.1.9.", "supportingMedia": [ { "type": "text/html", "base64": false, - "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise \u0109e Windows, macOS kaj XT-4500 permesas al malproksimaj nea\u016dtentikigitaj atakantoj eskaladi privilegiojn.

\u0108i tiu afero efikas:
  • 1.0-versioj anta\u016d 1.0.6
  • 2.1-versioj de 2.16 \u011dis 2.1.9.
" + "value": "OS-komand-injekta vundebleco parseFilename funkcio de example.php en la Web Administrado-Interfaco de Example.org Example Enterprise \u0109e Windows, macOS kaj XT-4500 permesas al malproksimaj nea\u016dtentikigitaj atakantoj eskaladi privilegiojn.

\u0108i tiu afero efikas:
  • 1.0-versioj anta\u016d 1.0.6
  • 2.1-versioj de 2.1.6 \u011dis 2.1.9.
" } ] }