BIT-git-2025-48384: Git allows arbitrary code execution through broken config quoting

Published Jul 8, 2025
·
Updated

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.

Affected Software

1 affected component
Git Git<2.43.7, <2.44.4, <2.45.4, <2.46.4, <2.47.3, <2.48.2, <2.49.1, <2.50.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.43.7
  2. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.44.4
  3. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.45.4
  4. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.46.4
  5. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.47.3
  6. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.48.2
  7. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.49.1
  8. Upgrade

    Upgrade Git to a version that resolves this vulnerability.

    Fixed in v2.50.1

Event History

Jul 8, 2025
CVE Published
via OSV·06:23 PM
Data Sourced
via OSV·06:23 PM
DescriptionSeverityWeakness

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