# CVE-2023-49568: Maliciously crafted Git server replies can cause DoS on go-git clients

> Attackers can cause resource exhaustion and denial of service in go-git clients by sending maliciously crafted Git server responses.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Jan 2024
- **Updated:** 17 Jun 2025
- **Also known as:** AZL-33892, AZL-35095, AZL-39595, CLEANSTART-2026-XB80449, DEBIAN-CVE-2023-49568, GHSA-mw99-9chc-xw7r, GO-2024-2466, UBUNTU-CVE-2023-49568

## What is CVE-2023-49568?

CVE-2023-49568 is a high-severity denial of service vulnerability in go-git, published on 12 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A denial of service (DoS) vulnerability was discovered in go-git versions prior to v5.11. This vulnerability allows an attacker to perform denial of service attacks by providing specially crafted responses from a Git server which triggers resource exhaustion in go-git clients.

Applications using only the in-memory filesystem supported by go-git are not affected by this vulnerability.
This is a go-git implementation issue and does not affect the upstream git cli.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2023-49568?

6 open source packages ship an affected version, including github.com/go-git/go-git/v5 and gopkg.in/src-d/go-git.v4. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.11.0 |
| `github.com/go-git/go-git/v5` | Go | All versions | 5.11.0 |
| `github.com/go-git/go-git/v5` | Go | From 5.0.0 | 5.11.0 |
| `gopkg.in/src-d/go-git.v4` | Go | From 4.7.1 | None |
| `gopkg.in/src-d/go-git.v4` | Go | From 4.7.1 to 4.13.1 | None |
| `gopkg.in/src-d/go-git.v4` | Go | From 4.7.1 to 4.13.1 | None |

Products: Go-Git Project Go-Git.

## How do I fix CVE-2023-49568?

Upgrade github.com/go-git/go-git/v5 to 5.11.0 or later.

## Is CVE-2023-49568 being exploited?

There is no known exploitation of CVE-2023-49568 in the wild and no public exploit code.

## Other vulnerabilities in go-git

- [CVE-2023-49569](https://insights.sbomify.com/CVE-2023-49569/): Maliciously crafted Git server replies can lead to path traversal and RCE on go-git clients (critical 9.8)
- [CVE-2025-21613](https://insights.sbomify.com/CVE-2025-21613/): go-git has an Argument Injection via the URL field (critical 9.2)
- [CVE-2025-21614](https://insights.sbomify.com/CVE-2025-21614/): go-git clients vulnerable to DoS via maliciously crafted Git server replies (high 7.5)
- [CVE-2026-45022](https://insights.sbomify.com/CVE-2026-45022/): go-git: Improper parsing of specially crafted objects may lead to inconsistent interpretation compared to upstream Git (high 7.0)
- [CVE-2026-45571](https://insights.sbomify.com/CVE-2026-45571/): go-git: Crafted repositories may modify main and submodule .git directories (medium 5.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-49568 and fix it if it is affected.

What it is: CVE-2023-49568 is a high-severity denial of service vulnerability in go-git, published on 12 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-49568 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.11.0
- github.com/go-git/go-git/v5 (Go): affected all versions; fixed in 5.11.0
- github.com/go-git/go-git/v5 (Go): affected from 5.0.0; fixed in 5.11.0
- gopkg.in/src-d/go-git.v4 (Go): affected from 4.7.1; no fix listed
- gopkg.in/src-d/go-git.v4 (Go): affected from 4.7.1 up to 4.13.1; no fix listed
- gopkg.in/src-d/go-git.v4 (Go): affected from 4.7.1 up to 4.13.1; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-49568/ (Markdown: https://insights.sbomify.com/CVE-2023-49568/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-49568
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-49568
- OSV: https://osv.dev/vulnerability/CVE-2023-49568

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-49568/
Summaries are generated and may contain mistakes; the official description above is the record.
