# GHSA-hxp2-xqf3-v83h: Panic during unmarshal of Hello Verify Request in github.com/pion/dtls/v2

> A remote attacker can crash the application by sending a malformed Server Hello 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-1535

## What is GHSA-hxp2-xqf3-v83h?

GHSA-hxp2-xqf3-v83h 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

When attempting to unmarshal a Server Hello request we could attempt to unmarshal into a buffer that was too small. This could result in a panic leading the program to crash.

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

### Workaround

None

## Which versions are affected by GHSA-hxp2-xqf3-v83h?

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-hxp2-xqf3-v83h?

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

## Is GHSA-hxp2-xqf3-v83h being exploited?

There is no known exploitation of GHSA-hxp2-xqf3-v83h in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-hxp2-xqf3-v83h and fix it if it is affected.

What it is: GHSA-hxp2-xqf3-v83h 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-hxp2-xqf3-v83h 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-hxp2-xqf3-v83h/ (Markdown: https://insights.sbomify.com/GHSA-hxp2-xqf3-v83h/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-hxp2-xqf3-v83h

---
From sbomify Insights: https://insights.sbomify.com/GHSA-hxp2-xqf3-v83h/
Summaries are generated and may contain mistakes; the official description above is the record.
