Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in hyper-bump-it
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.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | hyper-bump-it | < 0.5.1 | 0.5.1 |
Referencias
- https://github.com/plannigan/hyper-bump-it/security/advisories/GHSA-xc27-f9q3-4448
- https://nvd.nist.gov/vuln/detail/CVE-2023-41057
- https://github.com/plannigan/hyper-bump-it/pull/307
- https://github.com/plannigan/hyper-bump-it
- https://pypi.org/project/hyper-bump-it
- https://github.com/advisories/GHSA-xc27-f9q3-4448
- Vector CVSS
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N- Debilidad (CWE)
CWE-22- Plataforma
- Python (PyPI)
- Paquete
hyper-bump-it- Publicada
- 04.09.2023
- Actualizado
- 11.10.2026 15:17
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-1456 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-xc27-f9q3-4448 - CC BY 4.0
Historial de vulnerabilidades: hyper-bump-it
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
Esta es la única vulnerabilidad conocida de este paquete.
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.