OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"
Los mantenedores suelen responder en 1 día
@Ashutosh-Panda2004 ya está trabajando en esto.
Desde el 26/10/2026.
- #2483 de @Ashutosh-Panda2004 — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Empieza con get_version_range_from_state en vulnerabilities/oval_parser.py y sigue cómo construye rangos de versiones a partir del texto de estado de OVAL. Añade pruebas de regresión para los casos de época indicados, incluidos 10:, 20: y un 0: incrustado, y luego ejecuta las pruebas pertinentes del analizador. Se considera terminado cuando solo se elimina un 0: predeterminado inicial y el resto del contenido de la versión permanece sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 716
- Forks
- 347
- Merge medio
- 13 h 47 min
- PR fusionados (30 d)
- 8
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aboutcode-org/vulnerablecode
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargoPosiblemente ocupada @Ashutosh-Panda2004 la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
aboutcode-org/vulnerablecode#2485 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .envPosiblemente ocupada @Anurag-S1ngh la tomó hace 6 días. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 77/100
aboutcode-org/vulnerablecode#2477 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
aboutcode-org/vulnerablecode#2426 ·
Los mantenedores suelen responder en 1 día
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/Quizá libre de nuevo @Anshi321 la tomó hace 26 días y no hay ningún pull request abierto. Abiertobug data-quality
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aboutcode-org/vulnerablecode#2418 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
We do not collect the affected range for Gitlab advisoriesPosiblemente ocupada @akashrajeev la tomó hace 12 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
aboutcode-org/vulnerablecode#2412 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de aboutcode-org/vulnerablecode
Issues similares
-
[oblt-aw][autodoc] Document new required `shared-org-key` input for `obs-aw-dependency-review`Posiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
getchaintips leaves out the active tip once a header is staged on it, where Core always lists itAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
btclib-org/btclib-node#2158 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
dbt-msft/dbt-sqlserver#897 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Gathin23/cleanyourtv#2770 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Dao-AILab/flash-attention#3097 ·
Los mantenedores suelen responder en 3 días