highVulnerability

GHSA-26gq-p25f-99cp

## Summary An integer-overflow vulnerability in the frp server's optional SSH Tunnel Gateway lets any unauthenticated remote attacker crash the entire `frps` process with a single five-byte message. When the gateway parses an SSH `exec` channel request in `pkg/ssh/server.go`, it adds a small constant to a four-byte length value taken directly from the request. Because that length is fully attacker-controlled, a value of `0xFFFFFFFF` makes the addition wrap around to a tiny number, defeating the only bounds check and forcing an out-of-range slice. Go raises a panic that nothing recovers, so the whole server exits. In the default gateway mode SSH clients are not authenticated and the request is handled before any frp token is checked, so the crash is reachable pre-authentication. It carries no state and is trivially repeatable, turning one crash into a sustained outage that drops every tunnel for every user. ## Details The `exec` request payload is a four-byte big-endian length followed by that many command bytes, and the length field is fully attacker-controlled. The gateway computes the end of the command as `4 + length`. The constant `4` takes the `uint32` type of the length field, so `4 + 0xFFFFFFFF` wraps modulo 2^32 to `3`. The only guard compares the real payload size against this wrapped value, so a five-byte payload passes the test `5 < 3`, and the slice runs from index 4 to index 3: ```go // pkg/ssh/server.go:315-319 end := 4 + binary.BigEndian.Uint32(req.Payload[:4]) // 4 + 0xFFFFFFFF wraps to 3 if len(req.Payload) < int(end) { // 5 < 3 is false, so it passes continue } extraPayload := string(req.Payload[4:end]) // payload[4:3] -> panic ``` The handler runs in a bare goroutine and no function in the call chain installs a `recover`, so the panic unwinds to the top of the goroutine and terminates the whole process rather than the single connection: ```go // pkg/ssh/server.go:226 go s.handleNewChannel(newChannel, extraP

Properties

ghsa_id
GHSA-26gq-p25f-99cp
summary
frp: Unauthenticated Remote Denial of Service in the frp SSH Tunnel Gateway via Integer Overflow
severity
high
cve_id
GHSA-26gq-p25f-99cp
is_ghsa_only
true
ghsa_published
2026-07-24T21:48:04Z
source_url
https://github.com/advisories/GHSA-26gq-p25f-99cp
ghsa_updated
2026-07-24T21:48:05Z

Related Entities (5)

REPORTED_BY (1)

[Source]GitHub Advisory Database

VULNERABLE_TO (1)

[Software]go/github.com/fatedier/frp

AFFECTS (1)

[Software]go/github.com/fatedier/frp

HAS_WEAKNESS (2)

[Weakness]Improper Validation of Array Index
[Weakness]Integer Overflow or Wraparound

Explore deeper with Ninja Signal's threat intelligence graph