CVE-2021-40330
published 2021-08-31CVE-2021-40330: 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…
PriorityP342high7.5CVSS 3.1
AVNACLPRNUINSUCHINAN
EPSS
3.20%
86.5th percentile
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.
Affected
10 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | debian_linux | — | — |
| debian | git | < git 1:2.30.1-1 (bookworm) | git 1:2.30.1-1 (bookworm) |
| git-scm | git | < 2.30.1 | 2.30.1 |
| git | git | >= 0 < 1:2.30.1-1 | 1:2.30.1-1 |
| git | git | >= 0 < 1:2.30.1-1 | 1:2.30.1-1 |
| git | git | >= 0 < 1:2.30.1-1 | 1:2.30.1-1 |
| git | git | >= 0 < 1:2.30.1-1 | 1:2.30.1-1 |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cm1_git_2.23.4-2_on_cbl_mariner_1.0 | — | — |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:N
osv7.5HIGH
vendor_debian7.5HIGH
vendor_msrc7.5HIGH
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
Git vulnerability
vendor_ubuntu·2021-09-13
CVE-2021-40330 Git vulnerability
Title: Git vulnerability
Summary: Git incorrectly handled certain repository paths.
It was discovered that Git allowed newline characters in
certain repository paths. An attacker could potentially use this issue to perform
cross-protocol requests.
Instructions: In general, a standard system update will make all the necessary changes.
Microsoft
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:
vendor_msrc·2021-08-10·CVSS 7.5
CVE-2021-40330 [HIGH] 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:
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.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additio
Red Hat
git: unexpected cross-protocol requests via a repository path containing a newline character
vendor_redhat·2021-01-07·CVSS 7.5
CVE-2021-40330 [HIGH] CWE-20 git: unexpected cross-protocol requests via a repository path containing a newline character
git: unexpected cross-protocol requests via a repository path containing a newline character
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.
A flaw was found in git where it 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. The highest threat from this vulnerability is to confidentiality.
Package: git (Red Hat Enterprise Linux 7) - Out of support scope
Package: git (Red Hat Enterprise Linux 8) - Not affected
Package: git (Red Hat Enterprise
Debian
CVE-2021-40330: git - git_connect_git in connect.c in Git before 2.30.1 allows a repository path to co...
vendor_debian·2021·CVSS 7.5
CVE-2021-40330 [HIGH] CVE-2021-40330: git - git_connect_git in connect.c in Git before 2.30.1 allows a repository path to co...
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.
Scope: local
bookworm: resolved (fixed in 1:2.30.1-1)
bullseye: resolved (fixed in 1:2.30.1-1)
forky: resolved (fixed in 1:2.30.1-1)
sid: resolved (fixed in 1:2.30.1-1)
trixie: resolved (fixed in 1:2.30.1-1)
GHSA
GHSA-8r9w-64qj-m6cj: git_connect_git in connect
ghsa_unreviewed·2022-05-24
CVE-2021-40330 [HIGH] GHSA-8r9w-64qj-m6cj: git_connect_git in connect
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.
OSV
CVE-2021-40330: git_connect_git in connect
osv·2021-08-31·CVSS 7.5
CVE-2021-40330 [HIGH] CVE-2021-40330: git_connect_git in connect
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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/git/git/commit/a02ea577174ab8ed18f847cf1693f213e0b9c473https://github.com/git/git/compare/v2.30.0...v2.30.1https://lists.debian.org/debian-lts-announce/2022/10/msg00014.htmlhttps://github.com/git/git/commit/a02ea577174ab8ed18f847cf1693f213e0b9c473https://github.com/git/git/compare/v2.30.0...v2.30.1https://lists.debian.org/debian-lts-announce/2022/10/msg00014.html
2021-08-31
Published