p PatchFirst

CVE-2023-29007

CVE-2023-29007 · Arbitrary configuration injection via `git submodule deinit`

This page contains facts from public vulnerability sources. Check the original advisory before updating.

Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, a specially crafted `.gitmodules` file with submodule URLs that are longer than 1024 characters can used to exploit a bug in `config.c::git_config_copy_or_rename_section_in_file()`. This bug can be used to inject arbitrary configuration into a user's `$GIT_DIR/config` when attempting to remove the configuration section associated with that submodule. When the attacker injects configuration values which specify executables to run (such as `core.pager`, `core.editor`, `core.sshCommand`, etc.) this can lead to a remote code execution. A fix A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid running `git submodule deinit` on untrusted repositories or without prior inspection of any submodule sections in `$GIT_DIR/config`.

CVSS 7.0 · High · EPSS 5.6% · Fix available

Published
Updated

Stack: system

Affected products and versions

  • git

    Versions
    • < 2.30.9: Affected
    • >= 2.31.0, < 2.31.8: Affected
    • >= 2.32.0, < 2.32.7: Affected
    • >= 2.33.0, < 2.33.8: Affected
    • >= 2.34.0, < 2.34.8: Affected
    • >= 2.35.0, < 2.35.8: Affected
    • >= 2.36.0, < 2.36.6: Affected
    • >= 2.37.0, < 2.37.7: Affected
    • >= 2.38.0, < 2.38.5: Affected
    • >= 2.39.0, < 2.39.3: Affected
    • >= 2.40.0, < 2.40.1: Affected

    No fix published

  • git Debian:12

    Versions
    • 1:2.39.2+next.20230215-1
    • 1:2.39.2-1.1
    Affected ranges
    • ECOSYSTEM: < 1:2.39.5-0+deb12u1

    Update to 1:2.39.5-0+deb12u1

  • git Debian:13

    Affected ranges
    • ECOSYSTEM: < 1:2.40.1-1

    Update to 1:2.40.1-1

  • git Debian:14

    Affected ranges
    • ECOSYSTEM: < 1:2.40.1-1

    Update to 1:2.40.1-1

  • git Ubuntu:Pro:16.04:LTS

    Versions
    • 1:2.5.0-1
    • 1:2.6.2-1
    • 1:2.6.3-1
    • 1:2.6.4-1
    • 1:2.7.0~rc3-1
    • 1:2.7.0-1
    • 1:2.7.3-0ubuntu1
    • 1:2.7.4-0ubuntu1
    • 1:2.7.4-0ubuntu1.1
    • 1:2.7.4-0ubuntu1.2
    • 1:2.7.4-0ubuntu1.3
    • 1:2.7.4-0ubuntu1.4
    • 1:2.7.4-0ubuntu1.5
    • 1:2.7.4-0ubuntu1.6
    • 1:2.7.4-0ubuntu1.7
    • 1:2.7.4-0ubuntu1.8
    • 1:2.7.4-0ubuntu1.9
    • 1:2.7.4-0ubuntu1.10
    • 1:2.7.4-0ubuntu1.10+esm1
    • 1:2.7.4-0ubuntu1.10+esm3
    • 1:2.7.4-0ubuntu1.10+esm4
    • 1:2.7.4-0ubuntu1.10+esm5
    • 1:2.7.4-0ubuntu1.10+esm6
    Affected ranges
    • ECOSYSTEM: < 1:2.7.4-0ubuntu1.10+esm7

    Update to 1:2.7.4-0ubuntu1.10+esm7

  • git Ubuntu:18.04:LTS

    Versions
    • 1:2.14.1-1ubuntu4
    • 1:2.15.1-1ubuntu2
    • 1:2.17.0-1ubuntu1
    • 1:2.17.1-1ubuntu0.1
    • 1:2.17.1-1ubuntu0.3
    • 1:2.17.1-1ubuntu0.4
    • 1:2.17.1-1ubuntu0.5
    • 1:2.17.1-1ubuntu0.6
    • 1:2.17.1-1ubuntu0.7
    • 1:2.17.1-1ubuntu0.8
    • 1:2.17.1-1ubuntu0.9
    • 1:2.17.1-1ubuntu0.10
    • 1:2.17.1-1ubuntu0.11
    • 1:2.17.1-1ubuntu0.12
    • 1:2.17.1-1ubuntu0.13
    • 1:2.17.1-1ubuntu0.14
    • 1:2.17.1-1ubuntu0.15
    • 1:2.17.1-1ubuntu0.16
    • 1:2.17.1-1ubuntu0.17
    Affected ranges
    • ECOSYSTEM: < 1:2.17.1-1ubuntu0.18

    Update to 1:2.17.1-1ubuntu0.18

  • git Ubuntu:20.04:LTS

    Versions
    • 1:2.20.1-2ubuntu1
    • 1:2.24.0-1ubuntu1
    • 1:2.24.0-1ubuntu2
    • 1:2.25.0-1ubuntu1
    • 1:2.25.1-1ubuntu1
    • 1:2.25.1-1ubuntu2
    • 1:2.25.1-1ubuntu3
    • 1:2.25.1-1ubuntu3.1
    • 1:2.25.1-1ubuntu3.2
    • 1:2.25.1-1ubuntu3.3
    • 1:2.25.1-1ubuntu3.4
    • 1:2.25.1-1ubuntu3.5
    • 1:2.25.1-1ubuntu3.6
    • 1:2.25.1-1ubuntu3.7
    • 1:2.25.1-1ubuntu3.8
    • 1:2.25.1-1ubuntu3.10
    Affected ranges
    • ECOSYSTEM: < 1:2.25.1-1ubuntu3.11

    Update to 1:2.25.1-1ubuntu3.11

  • git Ubuntu:22.04:LTS

    Versions
    • 1:2.32.0-1ubuntu1
    • 1:2.33.1-1ubuntu1
    • 1:2.34.1-1ubuntu1
    • 1:2.34.1-1ubuntu1.1
    • 1:2.34.1-1ubuntu1.2
    • 1:2.34.1-1ubuntu1.4
    • 1:2.34.1-1ubuntu1.5
    • 1:2.34.1-1ubuntu1.6
    • 1:2.34.1-1ubuntu1.8
    Affected ranges
    • ECOSYSTEM: < 1:2.34.1-1ubuntu1.9

    Update to 1:2.34.1-1ubuntu1.9

Original sources

Check your server →