Dropbear fails to enforce permitopen/permitlisten on unix-socket forwarding, exposing docker.sock
Dropbear's per-destination key restrictions are not applied to unix-socket forwarding, allowing a restricted key to reach docker.sock.
Reported by Full Disclosure
First reported Summary updated
- Public PoC
- Not known
- Exploited
- Not known
- CVSS
- 9.9 Critical
What happened
Dropbear's permitopen and permitlisten restrictions are enforced for TCP forwarding but not for unix-socket forwarding, so a key restricted to one destination can still open streamlocal channels.1
The streamlocal forwarding paths are enabled by default in the build configuration.1
A 2024 commit added a coarse no-port-forwarding gate to unix sockets but did not apply the per-destination restrictions, leaving the gap.1
In a live test, a key with permitopen="127.0.0.1:1" was refused TCP access to 127.0.0.1:22 but successfully opened a streamlocal channel to /tmp/target.sock.1
The same restricted key reached /var/run/docker.sock and issued a Docker API request, receiving a 200 OK response from the daemon.1
Who is affected
- Dropbear SSH server, commit 99baf1828c13e88de048e641d03694bfe8923251 (2026-11-11)1
Is there a public exploit?
Not known None of the sources mentions public exploit code yet.
Exploited in the wild?
Not known None of the sources reports attacks using it so far.
For bug hunters
This is an access-control gap where per-key forwarding restrictions are not applied to unix-socket forwarding. In SSH implementations, look for streamlocal or direct-streamlocal channels that bypass permitopen/permitlisten checks. Test restricted keys against unix sockets such as docker.sock or database sockets to see if the restriction is enforced.
What to test
- Create a key with permitopen restricted to one TCP destination and attempt streamlocal forwarding to a unix socket.
- Check whether permitlisten restrictions apply to remote unix-socket forwarding.
- Test access to docker.sock or database sockets with a restricted key.
- Verify that no-port-forwarding and per-destination restrictions are enforced on all forwarding types.
Written by bugbounty.wiki with AI from its source. Every statement above comes with a quote we checked against the source it cites (the numbers link to it); anything we could not check was left out. It can still be wrong, so read the coverage before relying on a detail.
Coverage
The article this story is based on. Each headline opens the outlet's own article.
-
1