Skip to content
Heist/ feed
Back to feed
HighFix available

git — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-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 cross-protocol requests, as demonstrated by the git://localhost:1234/%0d%0a%0d%0aGET%20/%20HTTP/1.1 substring.

Products
git
Affected versions
Not specified
Fixed versions
2.26.3-r1
CVEs
CVE-2021-40330
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 22:06 UTC · Revision 1

Source evidence

ALPINE-CVE-2021-40330

core-osv · Original source

Published 31 Aug 2021, 04:15 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.

osv:ALPINE-CVE-2021-40330

git

Fixed versions: 2.26.3-r1

Complete source record
{
  "id": "85731330eef7712d69cb4b049094520ea86ae591243855b2c1ba35f52320cb63",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2021-40330",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2021-40330",
    "summary": "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.",
    "evidence": "osv:ALPINE-CVE-2021-40330",
    "products": [
      {
        "name": {
          "value": "git",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.26.3-r1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2021-40330",
      "aliases": [
        "ALPINE-CVE-2021-40330"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.26.3-r1"
                }
              ]
            }
          ],
          "package": {
            "name": "git",
            "purl": "pkg:apk/alpine/git?arch=source",
            "ecosystem": "Alpine:v3.12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-40330.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-23T17:17:56.209682889Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-40330"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2021-40330"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-40330",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 415542,
  "published_at": "2021-08-31T04:15:10.667+00:00"
}