Skip to content

Commit

Permalink
nvd api fixed version (#103)
Browse files Browse the repository at this point in the history
* NVD api. Better version handling for legacy CVE

Signed-off-by: Prabhu Subramanian <[email protected]>

* NVD api. Better version handling for legacy CVE

Signed-off-by: Prabhu Subramanian <[email protected]>

* Extra test

Signed-off-by: Prabhu Subramanian <[email protected]>

* Return str for repr methods

Signed-off-by: Prabhu Subramanian <[email protected]>

* unit test

Signed-off-by: Prabhu Subramanian <[email protected]>

* Trim the range used in index to improve search performance

Signed-off-by: Prabhu Subramanian <[email protected]>

---------

Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Mar 13, 2024
1 parent 926d5a5 commit 81f6a29
Show file tree
Hide file tree
Showing 7 changed files with 645 additions and 15 deletions.
282 changes: 282 additions & 0 deletions test/data/CVE-2015-3192.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
{
"id": "CVE-2015-3192",
"sourceIdentifier": "[email protected]",
"published": "2016-07-12T19:59:00.240",
"lastModified": "2022-04-11T17:18:31.247",
"vulnStatus": "Modified",
"descriptions": [
{
"lang": "en",
"value": "Pivotal Spring Framework before 3.2.14 and 4.x before 4.1.7 do not properly process inline DTD declarations when DTD is not entirely disabled, which allows remote attackers to cause a denial of service (memory consumption and out-of-memory errors) via a crafted XML file."
},
{
"lang": "es",
"value": "Pivotal Spring Framework en versiones anteriores a 3.2.14 y 4.x en versiones anteriores a 4.1.7 no procesa correctamente las declaraciones DTD en línea cuando DTD no está completamente desactivado, lo que permite a atacantes remotos provocar una caída de servicio (consumo de memoria y errores fuera de rango) a través de un archivo XML manipulado."
}
],
"metrics": {
"cvssMetricV30": [
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "3.0",
"vectorString": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
"attackVector": "LOCAL",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"availabilityImpact": "HIGH",
"baseScore": 5.5,
"baseSeverity": "MEDIUM"
},
"exploitabilityScore": 1.8,
"impactScore": 3.6
}
],
"cvssMetricV2": [
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "2.0",
"vectorString": "AV:N/AC:M/Au:N/C:N/I:N/A:P",
"accessVector": "NETWORK",
"accessComplexity": "MEDIUM",
"authentication": "NONE",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"availabilityImpact": "PARTIAL",
"baseScore": 4.3
},
"baseSeverity": "MEDIUM",
"exploitabilityScore": 8.6,
"impactScore": 2.9,
"acInsufInfo": false,
"obtainAllPrivilege": false,
"obtainUserPrivilege": false,
"obtainOtherPrivilege": false,
"userInteractionRequired": true
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Primary",
"description": [
{
"lang": "en",
"value": "CWE-119"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:pivotal_software:spring_framework:3.2.0:*:*:*:*:*:*:*",
"matchCriteriaId": "E02D9007-1215-4FD1-822A-BA95748E75D8"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.1:*:*:*:*:*:*:*",
"matchCriteriaId": "D2E2EA60-735E-431E-BEFE-DC5C1046E532"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.2:*:*:*:*:*:*:*",
"matchCriteriaId": "DFD1FA92-7BFC-4874-89FC-BE0F378F0DB3"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.3:*:*:*:*:*:*:*",
"matchCriteriaId": "7CC0E26F-2E8B-4B30-8C43-8BD2015EBB88"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.4:*:*:*:*:*:*:*",
"matchCriteriaId": "3CB73406-5FE4-438E-BCB7-57FBF6EC38D0"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.5:*:*:*:*:*:*:*",
"matchCriteriaId": "B76F06BC-F53E-4E37-B84F-3E992D459A49"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.6:*:*:*:*:*:*:*",
"matchCriteriaId": "DD8CC0CF-61DE-4E3A-80DD-4AD34EBDF419"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.7:*:*:*:*:*:*:*",
"matchCriteriaId": "09D49870-9E17-4049-9ABB-311C319A0E8F"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.8:*:*:*:*:*:*:*",
"matchCriteriaId": "EB9CE889-FBC5-4078-ABAC-8BC6CA235D04"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.9:*:*:*:*:*:*:*",
"matchCriteriaId": "AF34B57A-9732-44C8-9EC7-07394FB588F8"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.10:*:*:*:*:*:*:*",
"matchCriteriaId": "C528FEA9-2E5E-413B-89C1-F14C67059702"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.11:*:*:*:*:*:*:*",
"matchCriteriaId": "8C7EA42F-55C6-4934-8F60-98B7717188D2"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.12:*:*:*:*:*:*:*",
"matchCriteriaId": "E1DA44C3-D083-4584-8ACC-73B234767669"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:3.2.13:*:*:*:*:*:*:*",
"matchCriteriaId": "1D6399F2-B9D6-4097-89DB-5F4B434DFFD3"
}
]
}
]
},
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:o:fedoraproject:fedora:21:*:*:*:*:*:*:*",
"matchCriteriaId": "56BDB5A0-0839-4A20-A003-B8CD56F48171"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*",
"matchCriteriaId": "253C303A-E577-4488-93E6-68A8DD942C38"
}
]
}
]
},
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:pivotal_software:spring_framework:4.1.0:*:*:*:*:*:*:*",
"matchCriteriaId": "01D83EE4-F71B-4186-A34E-9128B6DA333B"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:4.1.1:*:*:*:*:*:*:*",
"matchCriteriaId": "CC1A4DB1-083B-4AAB-B1A2-CFFD487A1FBF"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:4.1.2:*:*:*:*:*:*:*",
"matchCriteriaId": "53D5991E-2CD0-42D9-8158-25FF18275B21"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:4.1.3:*:*:*:*:*:*:*",
"matchCriteriaId": "130DBD54-EF87-4A90-A727-F2BFFBF2DFA2"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:4.1.4:*:*:*:*:*:*:*",
"matchCriteriaId": "FDB59905-C658-4EFD-B073-FE84F0BF1DDB"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:4.1.5:*:*:*:*:*:*:*",
"matchCriteriaId": "B9382948-689D-40CD-ADC8-E41BB1F02D5B"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:vmware:spring_framework:4.1.6:*:*:*:*:*:*:*",
"matchCriteriaId": "2D269ABA-5E23-4F3D-B999-C51B2494EE01"
}
]
}
]
}
],
"references": [
{
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2015-July/162015.html",
"source": "[email protected]"
},
{
"url": "http://lists.fedoraproject.org/pipermail/package-announce/2015-July/162017.html",
"source": "[email protected]"
},
{
"url": "http://pivotal.io/security/cve-2015-3192",
"source": "[email protected]",
"tags": [
"Vendor Advisory"
]
},
{
"url": "http://rhn.redhat.com/errata/RHSA-2016-1592.html",
"source": "[email protected]"
},
{
"url": "http://rhn.redhat.com/errata/RHSA-2016-1593.html",
"source": "[email protected]"
},
{
"url": "http://rhn.redhat.com/errata/RHSA-2016-2035.html",
"source": "[email protected]"
},
{
"url": "http://rhn.redhat.com/errata/RHSA-2016-2036.html",
"source": "[email protected]"
},
{
"url": "http://www.securityfocus.com/bid/90853",
"source": "[email protected]"
},
{
"url": "http://www.securitytracker.com/id/1036587",
"source": "[email protected]"
},
{
"url": "https://access.redhat.com/errata/RHSA-2016:1218",
"source": "[email protected]"
},
{
"url": "https://access.redhat.com/errata/RHSA-2016:1219",
"source": "[email protected]"
},
{
"url": "https://jira.spring.io/browse/SPR-13136",
"source": "[email protected]"
},
{
"url": "https://lists.debian.org/debian-lts-announce/2019/07/msg00012.html",
"source": "[email protected]"
}
]
}
Loading

0 comments on commit 81f6a29

Please sign in to comment.