google / google/osv.dev

Data quality issue with ALPINE-CVE-2018-18311 / -18312 (inverted version range, false positives)

Open
#5,634 3 comments 1 reaction 1 assignee Claimed by @jess-lowe View on GitHub
Dominant language
Go
Stars
2.9k
Forks
369
Avg merge
1d 17h
Merged PRs (30d)
149

Description

### Affected records
- `ALPINE-CVE-2018-18311`
- `ALPINE-CVE-2018-18312`

### Problem
Both records carry an **inverted version range** on every Alpine branch:

```json
"events": [ { "introduced": "5.28.0" }, { "fixed": "5.26.3-r0" } ]
```

The `fixed` version (`5.26.3-r0`) sorts *below* the `introduced` version (`5.28.0`), so the
range `x >= 5.28.0 AND x < 5.26.3-r0` is unsatisfiable. Scanners drop the invalid `fixed`
event and flag **all** perl `>= 5.28.0` as vulnerable — including current `perl 5.42.2-r0`
on Alpine `v3.24` — for a 2018 CVE that was fixed in perl 5.26.3.

Source JSON:
- https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2018-18311.json
- https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2018-18312.json

### Evidence the range is wrong
Alpine's own secdb records the fix at `5.26.3-r0`, and the current branch ships `5.42.2-r0`:

```
# https://secdb.alpinelinux.org/v3.24/main.json (pkg: perl)
"secfixes": {
"5.26.3-r0": ["CVE-2018-18311", "CVE-2018-18312", "CVE-2018-18313", "CVE-2018-18314"],
...
"5.42.2-r0": [...] # current version on v3.24
}
```

The advisory text itself states *"Perl before 5.26.3 and 5.28.x before 5.28.1"*, so
perl 5.42.2 is not affected.

### Suggested correction (all Alpine branches)
```json
"events": [ { "introduced": "0" }, { "fixed": "5.26.3-r0" } ]
```

### Likely root cause
The alpine converter (`vulnfeeds/cmd/converters/alpine`) appears to have taken `introduced`
from the NVD CPE range (`5.28.x`) instead of emitting `introduced: 0` for a secfix-only
advisory, then paired it with the Alpine secfix `5.26.3-r0` — two different perl branches
(5.26.x vs 5.28.x) merged into one inverted range. The sibling records `ALPINE-CVE-2018-18313`
and `ALPINE-CVE-2018-18314` share the same secfix line and are worth checking for the same
defect.

This is the same class of malformed-Alpine-range false positive as #4165.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.