5.5medium
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in hyper-bump-it
- Severity
- 5.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.36% (higher than 32% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xc27-f9q3-4448PYSEC-2026-1456
Description
hyper-bump-it is a command line tool for updating the version in project files.`hyper-bump-it` reads a file glob pattern from the configuration file. That is combined with the project root directory to construct a full glob pattern that is used to find files that should be edited. These matched files should be contained within the project root directory, but that is not checked. This could result in changes being written to files outside of the project. The default behaviour of `hyper-bump-it` is to display the planned changes and prompt the user for confirmation before editing any files. However, the configuration file provides a field that can be used cause files to be edited without displaying the prompt. This issue has been fixed in release version 0.5.1. Users are advised to upgrade. Users that are unable to update from vulnerable versions, executing `hyper-bump-it` with the `--interactive` command line argument will ensure that all planned changes are displayed and prompt the user for confirmation before editing any files, even if the configuration file contains `show_confirm_prompt=true`.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| plannigan hyper-bump-it | < 0.5.1 | CVE List |
| hyper-bump-it (PyPI) | before 0.5.1 | GitHub Advisory Database, PyPA Advisory Database |
| plannigan hyper_bump_it | before 0.5.1 | NVD |
All scores
| GitHub_M | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| GitHub | 3.3low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| PyPA Advisory Database | 3.3low CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
hyper-bump-it is a command line tool for updating the version in project files.`hyper-bump-it` reads a file glob pattern from the configuration file. That is combined with the project root directory to construct a full glob pattern that is used to find files that should be edited. These matched files should be contained within the project root directory, but that is not checked. This could result in changes being written to files outside of the project. The default behaviour of `hyper-bump-it` is to display the planned changes and prompt the user for confirmation before editing any files. However, the configuration file provides a field that can be used cause files to be edited without displaying the prompt. This issue has been fixed in release version 0.5.1. Users are advised to upgrade. Users that are unable to update from vulnerable versions, executing `hyper-bump-it` with the `--interactive` command line argument will ensure that all planned changes are displayed and prompt the user for confirmation before editing any files, even if the configuration file contains `show_confirm_prompt=true`.
GitHub Advisory Database
Summary
hyper-bump-it reads a file glob pattern from the configuration file. That is combined with the project root directory to construct a full glob pattern that is used to find files that should be edited. These matched files should be contained within the project root directory, but that is not checked. This could result in changes being written to files outside of the project.
The default behaviour of hyper-bump-it is to display the planned changes and prompt the user for confirmation before editing any files. However, the configuration file provides a field that can be used cause files to be edited without displaying the prompt.
Details
The vulnerability is present in
That code joins the project root directory with a string read from the configuration file without checking if the final path is located outside the project root directory.
The following configuration file contents would cause hyper-bump-it to replace every instance of "hello" in every file adjacent to the project root directory with "world". The line setting show_confirm_prompt to false is not required, but will result in the user file edits to occur without the user having a chance to reject the changes (The fact that changes happened would still be displayed).
[hyper-bump-it]
current_version = "1.2.3"
show_confirm_prompt=false
[[hyper-bump-it.files]]
file_glob = "../*"
search_format_pattern = "hello"
replace_format_pattern = "world"
Patches
A fix that been released as part of v0.5.1. The changes can be view as part of PR #307.
Workarounds
Users that are unable to update from vulnerable versions, executing hyper-bump-it with the --interactive command line argument will ensure that all planned changes are displayed and prompt the user for confirmation before editing any files, even if the configuration file contains show_confirm_prompt=true.
NVD (es)
hyper-bump-it es una herramienta de línea de comandos para actualizar la versión de los archivos del proyecto. Hyper-bump-it lee un patrón glob del archivo de configuración. Esto se combina con el directorio raíz del proyecto para construir un patrón glob completo que se utiliza para encontrar los archivos que deben ser editados. Estos archivos deben estar dentro del directorio raíz del proyecto, pero esto no se comprueba. Esto podría provocar que los cambios se escribieran en ficheros fuera del proyecto. El comportamiento por defecto de hyper-bump-it es mostrar los cambios planeados y pedir confirmación al usuario antes de editar cualquier fichero. Sin embargo, el fichero de configuración proporciona un campo que puede utilizarse para editar ficheros sin que aparezca la pregunta. Este problema se ha solucionado en la versión 0.5.1. Se recomienda a los usuarios que actualicen. Los usuarios que no puedan actualizar desde versiones vulnerables, ejecutando hyper-bump-it con el argumento de línea de comandos "--interactive" se asegurarán de que se muestren todos los cambios planificados y pedirán confirmación al usuario antes de editar cualquier archivo, incluso si el archivo de configuración contiene "show_confirm_prompt=true".
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-41057 changed 2024-09-27 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xc27-f9q3-4448 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2023-41057 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1456 changed 2026-07-07 | CC-BY-4.0 |