# GHSA-4xgv-j62q-h3rj: Panic during unmarshal of Hello Verify Request in github.com/pion/dtls/v2

> A remote attacker can crash the application by sending a malformed Hello Verify Request, causing a denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Feb 2023
- **Also known as:** GO-2023-1534

## What is GHSA-4xgv-j62q-h3rj?

GHSA-4xgv-j62q-h3rj is a denial of service vulnerability in github.com/pion/dtls, published on 7 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

During the unmarshalling of a hello verify request we could try to unmarshal into too small a buffer. is could result in a panic leading the program to crash.

This issue could be abused to cause a denial of service.

### Workaround

None, upgrade to 2.2.4

## Which versions are affected by GHSA-4xgv-j62q-h3rj?

5 open source packages ship an affected version, including github.com/pion/dtls/v2 and github.com/pion/dtls.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/pion/dtls/v2` | Go | All versions | 2.2.4 |
| `github.com/pion/dtls/v2` | Go | All versions | 2.2.4 |
| `github.com/pion/dtls/v2` | Go | All versions | 2.2.4 |
| `github.com/pion/dtls` | Go | All versions to 1.5.4 | None |
| `github.com/pion/dtls` | Go | All versions to 1.5.4 | None |

## How do I fix GHSA-4xgv-j62q-h3rj?

Upgrade github.com/pion/dtls/v2 to 2.2.4 or later.

## Is GHSA-4xgv-j62q-h3rj being exploited?

There is no known exploitation of GHSA-4xgv-j62q-h3rj in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-4xgv-j62q-h3rj and fix it if it is affected.

What it is: GHSA-4xgv-j62q-h3rj is a denial of service vulnerability in github.com/pion/dtls, published on 7 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-4xgv-j62q-h3rj in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/pion/dtls/v2 (Go): affected all versions; fixed in 2.2.4
- github.com/pion/dtls/v2 (Go): affected all versions; fixed in 2.2.4
- github.com/pion/dtls/v2 (Go): affected all versions; fixed in 2.2.4
- github.com/pion/dtls (Go): affected all versions up to 1.5.4; no fix listed
- github.com/pion/dtls (Go): affected all versions up to 1.5.4; 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/GHSA-4xgv-j62q-h3rj/ (Markdown: https://insights.sbomify.com/GHSA-4xgv-j62q-h3rj/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-4xgv-j62q-h3rj

---
From sbomify Insights: https://insights.sbomify.com/GHSA-4xgv-j62q-h3rj/
Summaries are generated and may contain mistakes; the official description above is the record.
