CVE-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…
Noroxi assessment
Priority: Monitor (action score 31/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 2.8% (FIRST EPSS); higher than 87% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: git (Alpine:v3.12) 2.26.3-r1; git (Debian:10) 1:2.20.1-2+deb10u4; git (Debian:12) 1:2.30.1-1.
Low priority for now. Upgrade to git (Alpine:v3.12) 2.26.3-r1; git (Debian:10) 1:2.20.1-2+deb10u4; git (Debian:12) 1:2.30.1-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Aug 31, 2021
- Updated
- Jun 17, 2026
- EPSS
- 2.8% · 87th percentile
- CWE
- —
Report tools
Action score
31
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.8%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux10.0
- git-scm gitbefore 2.30.1
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.12 | git | before 2.26.3-r1 | 2.26.3-r1 |
| Debian:10 | git | before 1:2.20.1-2+deb10u4 | 1:2.20.1-2+deb10u4 |
| Debian:12 | git | before 1:2.30.1-1 | 1:2.30.1-1 |
| openSUSE:Leap 15.2 | git | before 2.26.2-lp152.2.12.1 | 2.26.2-lp152.2.12.1 |
| openSUSE:Leap 15.3 | git | before 2.26.2-33.1 | 2.26.2-33.1 |
| SUSE:HPE Helion OpenStack 8 | git | before 2.26.2-27.49.3 | 2.26.2-27.49.3 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP2 | git | before 2.26.2-33.1 | 2.26.2-33.1 |
Same product
git-scm: all recordsOther highest-scoring records for the same primary product.
- CVE-2018-17456Git before 2.14.5, 2.15.x before 2.15.3, 2.16.x before 2.16.5, 2.17.x before 2.17.2, 2.18.x before 2.18.1, and 2.19.x before 2.19.1 allows…68This week
- CVE-2025-48384Git allows arbitrary code execution through broken config quotingKEV63This week
- CVE-2021-21300malicious repositories can execute remote code while cloning60This week
Published before and after this one in the same product
- ← EarlierCVE-2019-1353Jan 24, 2020 · An issue was found in Git before v2.24.1, v2.23.1, v2.22.2, v2.21.1, v2.20.2, v2.19.3, v2.18.2, v2.17.3, v2.16.6, v2.15.4, and v2.14.6.40Plan
- ← EarlierCVE-2020-11008Apr 21, 2020 · Malicious URLs can still cause Git to send a stored credential to the wrong server31Monitor
- Later →CVE-2022-24975Feb 11, 2022 · The --mirror documentation for Git through 2.35.1 does not mention the availability of deleted content, aka the "GitBleed" issue.31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:git | 2.26.3-r1 · Alpine:v3.12 | Package registry (OSV) |
| debian:git | 1:2.30.1-1 · Debian:12 | Package registry (OSV) |
| opensuse:git | 2.26.2-lp152.2.12.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| suse:git | 2.26.2-33.1 · SUSE:Linux Enterprise Module for Basesystem 15 SP2 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- none
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- None
- Availability impact
- None
Weakness class (CWE)
—
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (1 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.