OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"
Maintainer thường phản hồi trong vòng 1 ngày
@Ashutosh-Panda2004 đang làm issue này rồi.
Từ ngày 26/10/2026.
- #2483 của @Ashutosh-Panda2004 — đang mở
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Bắt đầu với get_version_range_from_state trong vulnerabilities/oval_parser.py và theo dõi cách hàm này tạo các khoảng phiên bản từ văn bản trạng thái OVAL. Bổ sung kiểm thử hồi quy cho các trường hợp epoch được liệt kê, bao gồm 10:, 20: và một 0: nằm bên trong, sau đó chạy các kiểm thử parser liên quan. Công việc được xem là hoàn tất khi chỉ 0: mặc định ở đầu bị loại bỏ và phần nội dung phiên bản còn lại không thay đổi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 716
- Fork
- 347
- Merge trung bình
- 12 giờ 15 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aboutcode-org/vulnerablecode
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargoCó thể đã có người làm @Ashutosh-Panda2004 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aboutcode-org/vulnerablecode#2485 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .envCó thể đã có người làm @Anurag-S1ngh đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 77/100
aboutcode-org/vulnerablecode#2477 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
aboutcode-org/vulnerablecode#2426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/Có thể làm lại được @Anshi321 đã nhận 24 ngày trước và không có pull request nào đang mở. Đang mởbug data-quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aboutcode-org/vulnerablecode#2418 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
We do not collect the affected range for Gitlab advisoriesCó thể đã có người làm @akashrajeev đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
aboutcode-org/vulnerablecode#2412 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aboutcode-org/vulnerablecode
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Add alembic upgrade predeployĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ClockGU/clockwork-backend#169 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws-samples/sample-per-model-bedrock#616 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
chnm/teachinghistory-hugo#47 ·
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
pandas-dev/pandas-stubs#2047 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày