Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Improper Input Validation in CVSS v3 parsing #202

Open
pandatix opened this issue Jan 28, 2023 · 0 comments
Open

Improper Input Validation in CVSS v3 parsing #202

pandatix opened this issue Jan 28, 2023 · 0 comments

Comments

@pandatix
Copy link

pandatix commented Jan 28, 2023

While fuzzing this implementation, I discovered that some invalid inputs did not raise errors.
This could be categorized as CWE-20.

For instance, the following Go code does not produce any error.

package main

import (
	"fmt"

	"github.com/facebookincubator/nvdtools/cvss3"
)

func main() {
	vec, err := cvss3.VectorFromString("CVSS:3.1/AV:")

	fmt.Printf("vec: %v\n", vec)
	fmt.Printf("err: %v\n", err)
}

produces ->

vec: CVSS:3.1/
err: <nil>

You can check this input is invalid, using the official first.org calculator which does not give scores as it lacks a lot of valid info, or by looking at the specification Table 15 which shows that base metrics can't be empty.

EDIT: using version v0.1.5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant