CVE-2023-41057: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in hyper-bump-it

Published Sep 4, 2023
·
Updated

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

https://github.com/plannigan/hyper-bump-it/blob/49c726201bbdc02c052302e03fd907d2170e1f47/hyperbumpit/hyperbumpit/files.py#L35

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 showconfirmprompt 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).

toml [hyper-bump-it] currentversion = "1.2.3" showconfirmprompt=false

[[hyper-bump-it.files]] fileglob = "../" searchformatpattern = "hello" replaceformatpattern = "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 showconfirmprompt=true.

Other sources

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 showconfirmprompt=true.

MITRE

Affected Software

2 affected componentsFixes available
pip/hyper-bump-it<0.5.1
0.5.1
plannigan Hyper Bump It Python<0.5.1

Event History

Sep 4, 2023
Advisory Published
05:02 PM
CVE Published
via MITRE·05:19 PM
Data Sourced
via MITRE·05:19 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2023-41057?

The severity of CVE-2023-41057 is classified as moderate.

2

How do I fix CVE-2023-41057?

To fix CVE-2023-41057, upgrade the 'hyper-bump-it' package to version 0.5.2 or higher.

3

What software is affected by CVE-2023-41057?

CVE-2023-41057 affects the 'hyper-bump-it' package version up to 0.5.1.

4

What is the nature of the vulnerability in CVE-2023-41057?

CVE-2023-41057 allows arbitrary file access through unvalidated file glob patterns.

5

Is CVE-2023-41057 exploitable in production environments?

Yes, CVE-2023-41057 can be exploited in production environments if the vulnerable software is in use.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203