Skip to content

curl_importer_v2 stores curl's textual severity (Low/Medium/High/Critical) as CVSS v3.1 #2557

Backlog

Description

@Ankit-dmc

What happens

curl rates its advisories on its own Low / Medium / High / Critical scale and does not use CVSS. Its disclosure policy says: "We do not support CVSS as a method to grade security vulnerabilities" (https://curl.se/dev/vuln-disclosure.html#severity-levels).

parse_curl_advisory() in curl_importer_v2 stores this value under the CVSS v3.1 scoring system:

https://github.com/aboutcode-org/vulnerablecode/blob/62ebb694/vulnerabilities/pipelines/v2_importers/curl_importer.py#L104-L106

So every curl advisory (239 in https://curl.se/docs/vuln.json today) gets a severity with scoring_system = "cvssv3.1" and a value like "Low".

Reproduction

from vulnerabilities.pipelines.v2_importers.curl_importer import parse_curl_advisory
from vulnerabilities.severity_systems import SCORING_SYSTEMS
import requests

entry = requests.get("https://curl.se/docs/vuln.json").json()[0]
sev = parse_curl_advisory(entry).severities[0]
print(sev.system.identifier, sev.value)   # cvssv3.1 Low
SCORING_SYSTEMS["cvssv3.1"].compute(sev.value)
# CVSS3MalformedError: Malformed CVSS3 vector "Low" ...

API and UI users see a "CVSSv3.1" severity of "Low", and anything that treats cvssv3.1 values as CVSS (for example the CVSS comparison in compute_advisory_todo) gets a non-CVSS value.

Suggested fix

Use GENERIC (generic_textual), the existing system for textual ratings like "High" or "Low". The curl importer is the only v2 importer that tags a textual rating as cvssv3.1.

I have a fix with an updated test and will open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions