CVEfocus › CVE database › CVE-2021-40330

CVE-2021-40330

CVSS 7.5 HighEPSS 2.9% (higher than 88% of CVEs)Published 2021-08-31Updated 2024-08-04Assigner: mitre

git_connect_git in connect.c in Git before 2.30.1 allows a repository path to contain a newline character, which may result in unexpected cross-protocol requests, as demonstrated by the git://localhost:1234/%0d%0a%0d%0aGET%20/%20HTTP/1.1 substring.

What to do

Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fixed
1Fix pending
18Will not fix
31Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04gitNot affected
vulnerable_code_not_present
Ubuntu 20.04gitFixed1:2.25.1-1ubuntu3.2UBUNTU-CVE-2021-40330
Ubuntu 18.04gitFixed1:2.17.1-1ubuntu0.9UBUNTU-CVE-2021-40330
Ubuntu 16.04gitFix pending1:2.7.4-0ubuntu1.10+esm1 (Ubuntu Pro)UBUNTU-CVE-2021-40330
Debian 14gitFixed1:2.30.1-1DEBIAN-CVE-2021-40330
Debian 13gitFixed1:2.30.1-1DEBIAN-CVE-2021-40330
Debian 12gitFixed1:2.30.1-1DEBIAN-CVE-2021-40330
Red Hat Enterprise Linux 9gitNot affected
Red Hat Enterprise Linux 9git-allNot affected
Red Hat Enterprise Linux 9git-coreNot affected
Red Hat Enterprise Linux 9git-core-docNot affected
Red Hat Enterprise Linux 9git-credential-libsecretNot affected
Red Hat Enterprise Linux 9git-daemonNot affected
Red Hat Enterprise Linux 9git-emailNot affected
Red Hat Enterprise Linux 9git-guiNot affected
Red Hat Enterprise Linux 9git-instawebNot affected
Red Hat Enterprise Linux 9git-subtreeNot affected
Red Hat Enterprise Linux 9git-svnNot affected
Red Hat Enterprise Linux 9gitkNot affected
Red Hat Enterprise Linux 9gitwebNot affected
Red Hat Enterprise Linux 9perl-GitNot affected
Red Hat Enterprise Linux 9perl-Git-SVNNot affected
Red Hat Enterprise Linux 8gitNot affected
Red Hat Enterprise Linux 8git-allNot affected
Red Hat Enterprise Linux 8git-coreNot affected
Red Hat Enterprise Linux 8git-core-docNot affected
Red Hat Enterprise Linux 8git-credential-libsecretNot affected
Red Hat Enterprise Linux 8git-daemonNot affected
Red Hat Enterprise Linux 8git-emailNot affected
Red Hat Enterprise Linux 8git-guiNot affected
Red Hat Enterprise Linux 8git-instawebNot affected
Red Hat Enterprise Linux 8git-subtreeNot affected
Red Hat Enterprise Linux 8git-svnNot affected
Red Hat Enterprise Linux 8gitkNot affected
Red Hat Enterprise Linux 8gitwebNot affected
Red Hat Enterprise Linux 8perl-GitNot affected
Red Hat Enterprise Linux 8perl-Git-SVNNot affected
Red Hat Enterprise Linux 7emacs-gitWill not fix
Out of support scope
Red Hat Enterprise Linux 7emacs-git-elWill not fix
Out of support scope
Red Hat Enterprise Linux 7gitWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-allWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-bzrWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-cvsWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-daemonWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-emailWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-gnome-keyringWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-guiWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-hgWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-instawebWill not fix
Out of support scope
Red Hat Enterprise Linux 7git-p4Will not fix
Out of support scope
Red Hat Enterprise Linux 7git-svnWill not fix
Out of support scope
Red Hat Enterprise Linux 7gitkWill not fix
Out of support scope
Red Hat Enterprise Linux 7gitwebWill not fix
Out of support scope
Red Hat Enterprise Linux 7perl-GitWill not fix
Out of support scope
Red Hat Enterprise Linux 7perl-Git-SVNWill not fix
Out of support scope
Alpine Linux 3.12gitFixed2.26.3-r1ALPINE-CVE-2021-40330

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.