From 0752628de587138b05bf6824eb68ad03dfc1382f Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Thu, 8 Apr 2021 19:14:13 +0200 Subject: [PATCH] fix: [cve_advanced] Some CVEs are not in CWE format but in NVD-CWE-Other --- misp_modules/modules/expansion/cve_advanced.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misp_modules/modules/expansion/cve_advanced.py b/misp_modules/modules/expansion/cve_advanced.py index 9071ff9..a5e807e 100644 --- a/misp_modules/modules/expansion/cve_advanced.py +++ b/misp_modules/modules/expansion/cve_advanced.py @@ -87,7 +87,7 @@ class VulnerabilityParser(): ) def __parse_weakness(self, vulnerability_uuid): - cwe_string, cwe_id = self.vulnerability['cwe'].split('-') + cwe_string, cwe_id = self.vulnerability['cwe'].split('-')[:2] cwes = requests.get(self.api_url.replace('/cve/', '/cwe')) if cwes.status_code == 200: for cwe in cwes.json():