StackPatch is liveSee product

Back to CVE digest
CVE-2023-41040 · cross-distro fix matrix

CVE-2023-41040: Santos Gallegos discovered that GitPython did not properly validate

Affects 14 Linux releases across 26 (distro × package) combinations. First disclosed: 2026-05-26.

Fix per ecosystem

Each block below is a distro release where CVE-2023-41040 has a known fix. Run the listed command on that distro to remediate.

Ubuntu bionic

Source: Ubuntu USN

  • python-git→ fixed in2.1.8-1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python-git
  • python-git-doc→ fixed in2.1.8-1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python-git-doc
  • python3-git→ fixed in2.1.8-1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python3-git

Ubuntu focal

Source: Ubuntu USN

  • python-git→ fixed in3.0.7-1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python-git
  • python-git-doc→ fixed in3.0.7-1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python-git-doc
  • python3-git→ fixed in3.0.7-1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python3-git

Ubuntu jammy

Source: Ubuntu USN

  • python-git→ fixed in3.1.24-1ubuntu0.1~esm3USN-8303-1
    sudo apt-get install --only-upgrade -y python-git
  • python-git-doc→ fixed in3.1.24-1ubuntu0.1~esm3USN-8303-1
    sudo apt-get install --only-upgrade -y python-git-doc
  • python3-git→ fixed in3.1.24-1ubuntu0.1~esm3USN-8303-1
    sudo apt-get install --only-upgrade -y python3-git

Ubuntu noble

Source: Ubuntu USN

  • python-git→ fixed in3.1.37-3ubuntu0.1~esm2USN-8303-1
    sudo apt-get install --only-upgrade -y python-git
  • python-git-doc→ fixed in3.1.37-3ubuntu0.1~esm2USN-8303-1
    sudo apt-get install --only-upgrade -y python-git-doc
  • python3-git→ fixed in3.1.37-3ubuntu0.1~esm2USN-8303-1
    sudo apt-get install --only-upgrade -y python3-git

Ubuntu resolute

Source: Ubuntu USN

  • python-git→ fixed in3.1.46-1ubuntu0.1~esm1USN-8303-1
    sudo apt-get install --only-upgrade -y python-git
  • python-git-doc→ fixed in3.1.46-1ubuntu0.1~esm1USN-8303-1
    sudo apt-get install --only-upgrade -y python-git-doc
  • python3-git→ fixed in3.1.46-1ubuntu0.1~esm1USN-8303-1
    sudo apt-get install --only-upgrade -y python3-git

Ubuntu trusty

Source: Ubuntu USN

  • python-git→ fixed in0.3.2~RC1-3ubuntu0.1~esm3USN-8303-1
    sudo apt-get install --only-upgrade -y python-git

Ubuntu xenial

Source: Ubuntu USN

  • python-git→ fixed in1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python-git
  • python-git-doc→ fixed in1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python-git-doc
  • python3-git→ fixed in1.0.1+git137-gc8b8379-2.1ubuntu0.1~esm4USN-8303-1
    sudo apt-get install --only-upgrade -y python3-git

Debian bullseye

Source: Debian Security Tracker

  • python-git→ fixed in3.1.14-1+deb11u1urgency: not yet assigned
    sudo apt-get install --only-upgrade -y python-git

Debian bookworm

Source: Debian Security Tracker

  • python-git→ fixed in3.1.30-1+deb12u2urgency: not yet assigned
    sudo apt-get install --only-upgrade -y python-git

Debian trixie

Source: Debian Security Tracker

  • python-git→ fixed in3.1.36-1urgency: not yet assigned
    sudo apt-get install --only-upgrade -y python-git

Alpine v3.20

Source: Alpine secdb

  • py3-gitpython→ fixed in3.1.37-r0
    apk update && apk add --upgrade py3-gitpython

Alpine v3.21

Source: Alpine secdb

  • py3-gitpython→ fixed in3.1.37-r0
    apk update && apk add --upgrade py3-gitpython

Alpine edge

Source: Alpine secdb

  • py3-gitpython→ fixed in3.1.37-r0
    apk update && apk add --upgrade py3-gitpython

Alpine v3.19

Source: Alpine secdb

  • py3-gitpython→ fixed in3.1.37-r0
    apk update && apk add --upgrade py3-gitpython
Are YOU affected by CVE-2023-41040?

5-second check on your actual server. Reads /etc/os-release, uname -r, and the distro's package manager; matches against this same cross-source index live.

curl https://mindsparkstack.com/scan.sh | bash
Continuous monitoring beats manual checking

CVE-2023-41040dropped silently in your distro's update channel. Every new CVE is the same story. StackPatch runs the matcher hourly against all 5 sources and emails the exact remediation when something new applies to one of your servers. From $9/mo, 14-day free trial, cancel anytime.

See StackPatch (from $9/mo)