Summary
Hysteria has an access-control bypass in UDP session handling that can let an authenticated client reach destinations that ACL rules block. The risk arises when a client reuses an established UDP session to send traffic to localhost or private-network addresses.
Affected context
The issue affects Hysteria versions from 2.0.0 up to, but not including, 2.9.2 when UDP access controls are used. It occurs in session handling where destination restrictions may not be consistently enforced for later packets in an established UDP session.
Exploit preconditions
- Attack surface: UDP traffic handled by a Hysteria server
- Required access: An authenticated client able to establish a UDP session
- Trigger point: Sending later packets through an existing session to a destination that should be blocked
- Why exploitation is possible: Destination ACL checks may be bypassed when the established session is reused for a different UDP destination
Why this happens
The underlying issue is inconsistent enforcement of access-control policy across the lifecycle of a UDP session. If destination authorization is checked when a session is created but not reliably applied to subsequent traffic, an authenticated client may reach destinations outside its permitted scope. This is an access-control weakness, mapped to CWE-284.
Potential impact
- An attacker could reach internal-only UDP services
- Services bound to localhost or private-network addresses may be exposed to unauthorized requests
- The issue may enable further probing or exploitation of systems reachable from the server's network
General mitigation guidance
Defensive approaches center on applying authorization consistently to every destination and traffic path.
- Enforce destination ACLs for each UDP packet, including packets sent through established sessions
- Use secure-by-default rules that deny destinations unless explicitly permitted
- Reduce trust in client-supplied destination information and validate it at the point of use
- Limit the server's network reachability and run it with only the privileges and network access it needs
- Review session reuse behavior to ensure it cannot weaken policy checks
How teams detect issues like this
- Review UDP session code for authorization checks performed only at session creation
- Use static analysis and code review to trace destination data through session reuse and packet forwarding
- Test ACL enforcement against loopback, private-network, and other restricted destination ranges
- Monitor for authenticated clients sending UDP traffic to destinations outside their configured policy
- Apply automated policy checks to ensure every forwarding path performs destination authorization

