Skip to content

Commit

Permalink
Workaround npm bug with inconsistent severity and score
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Nov 10, 2024
1 parent 357d762 commit eec0a2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vdb/lib/npm.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ def to_vuln(self, v, ret_data):
if vector_string:
cvss3_obj = get_cvss3_from_vector(vector_string)
if cvss3_obj:
# For some CVEs such as CVE-2024-47875, severity and score are not aligned
# By utilising the vector string, we make them consistent
score = cvss3_obj.get("baseScore")
severity = cvss3_obj.get("baseSeverity")
exploitability_score = cvss3_obj.get("temporalScore")
attack_complexity = cvss3_obj.get("attackComplexity")
user_interaction = cvss3_obj.get("userInteraction")
Expand Down

0 comments on commit eec0a2b

Please sign in to comment.