What’s Vulnerable › Vulnerabilities
CVE-2021-40330
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-08-31 · updated 2026-06-17
Description
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 products
- Debian Linux: 10.0
- git: before 2.30.1 — fixed in 2.30.1
How to fix
Upgrade to a fixed version: git 2.30.1. Check the vendor advisory for mitigations.
References
- https://github.com/git/git/commit/a02ea577174ab8ed18f847cf1693f213e0b9c473
- https://github.com/git/git/compare/v2.30.0...v2.30.1
- https://lists.debian.org/debian-lts-announce/2022/10/msg00014.html
- https://github.com/git/git/commit/a02ea577174ab8ed18f847cf1693f213e0b9c473
- https://github.com/git/git/compare/v2.30.0...v2.30.1
- https://lists.debian.org/debian-lts-announce/2022/10/msg00014.html
Get alerted when CVE-2021-40330 or the next vulnerability affects your stack