OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"
Maintainers usually reply within 1 day
@Ashutosh-Panda2004 is already working on this.
Since Oct 26, 2026.
- #2483 by @Ashutosh-Panda2004 — open
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start with get_version_range_from_state in vulnerabilities/oval_parser.py and trace how it builds version ranges from OVAL state text. Add regression coverage for the listed epoch cases, including 10:, 20: and an embedded 0:, then run the relevant parser tests. Done means only a leading default 0: is removed and other version content remains unchanged.
Written by the indexing model from the issue text.
Description
Description
I found a data corruption bug in the OVAL parser while investigating how version ranges are built from OVAL states.
In vulnerabilities/oval_parser.py, get_version_range_from_state strips the default epoch using a plain string replacement:
version_range = version_range.replace("0:", "")This removes every occurrence of 0: from the entire range string, rather than removing it only when it appears at the beginning of a version.
Steps to Reproduce
Feed version state texts through OvalParser using the Debian translations.
The following transformations occur:
| Input version | Result | Status |
|---|---|---|
0:4.14-1.1 |
<4.14-1.1 |
Correct |
1:4.14-1.1 |
<1:4.14-1.1 |
Correct |
10:4.14-1.1 |
<14.14-1.1 |
Incorrect |
20:4.14-1.1 |
<24.14-1.1 |
Incorrect |
0:10:2.0-1 |
<12.0-1 |
Incorrect |
Expected Behavior
The parser should remove an explicit leading 0: only when it represents the default version epoch. All other parts of the version string, including nonzero epochs and version components containing 0:, should remain unchanged.
Actual Behavior
The unrestricted string replacement corrupts version ranges by removing 0: wherever it occurs, potentially changing version ordering and causing affected packages to be incorrectly reported as not vulnerable.
For example, with univers:
10:3.0-1 < 10:4.14-1.1 # True10:3.0-1 < 14.14-1.1 # FalseThe corrupted upper bound therefore causes an affected build to be reported as not affected.
Additional Context
This issue affects the Debian, Ubuntu, and SUSE OVAL importers because they all parse through OvalParser.
A potential fix is to strip the epoch only at the beginning of the version range. Since epoch 0 is the default, removing an explicit leading 0: preserves the version's meaning while leaving the rest of the version string untouched.
- Dominant language
- Python
- Stars
- 719
- Forks
- 359
- Avg merge
- 11h 59m
- Merged PRs (30d)
- 2
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aboutcode-org/vulnerablecode
-
Pipeline run pages return 500 for a schedule whose pipeline is not registeredPossibly taken @sanchit955 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
aboutcode-org/vulnerablecode#2505 ·
Maintainers usually reply within 1 day
-
Affected-by-advisories v2 page returns 500 for a purl with no matching packagePossibly taken @sanchit955 claimed this 2 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
aboutcode-org/vulnerablecode#2501 ·
Maintainers usually reply within 1 day
-
OSV v3 parser shares introduced/fixed commit patches across affected packagesPossibly taken @Celestial-0 claimed this 15 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aboutcode-org/vulnerablecode#2489 ·
Maintainers usually reply within 1 day
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargoPossibly taken @Ashutosh-Panda2004 claimed this 22 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aboutcode-org/vulnerablecode#2485 · 1 comment ·
Maintainers usually reply within 1 day
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .envPossibly taken @Anurag-S1ngh claimed this 25 days ago. Open
Difficulty 2/5 Half a day Newbie friendliness 77/100
aboutcode-org/vulnerablecode#2477 · 1 comment ·
Maintainers usually reply within 1 day
All issues in aboutcode-org/vulnerablecode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
GoogleCloudPlatform/professional-services-data-validator#1899 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mohanraj00/entelos#200 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
sweep
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
bketelsen/truenas-mcp#77 ·
Maintainers usually reply within 1 day
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
sandbox-quantum/switch#2163 ·
Maintainers usually reply within 1 day