Bug 1999755 (CVE-2021-40330)

Summary: CVE-2021-40330 git: unexpected cross-protocol requests via a repository path containing a newline character
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bdettelb, besser82, caswilli, chrisw, fjansen, hhorak, johannes, jorton, juneau, kaycoth, opohorel, psegedy, pstodulk, sebastian.kisela, tmz, vmugicag, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: git 2.30.1 Doc Type: If docs needed, set a value
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2010570, 2010571, 2010572, 2017789    
Bug Blocks: 1999757    

Description Guilherme de Almeida Suckevicz 2021-08-31 17:15:52 UTC
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.

Reference and upstream patch:
https://github.com/git/git/commit/a02ea577174ab8ed18f847cf1693f213e0b9c473