You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Authenticated SOCKS bridge listens on wildcard interfaces #676
The authenticated SOCKS support starts an internal anonymous SOCKS5 bridge so Jakarta Mail can reach an authenticated upstream SOCKS proxy. That bridge is documented as local-only, but it currently binds on wildcard interfaces.
With no explicit address, the listener can be reachable beyond loopback. The bridge negotiates SOCKS5 with no local authentication and relays CONNECT requests through the configured authenticated upstream proxy.
The bridge starts for active sends or connection tests and is stopped after the final active operation completes.
Impact
If a host, container, or development environment exposes the bridge port to another machine, that machine can use the temporary listener as an unauthenticated TCP proxy through the application's configured upstream SOCKS credentials.
Expected behavior
The bridge must bind to loopback only. Jakarta Mail must be configured to use the same explicit loopback address, rather than relying on the potentially ambiguous localhost name.
Proposed fix
Bind the bridge server socket to a loopback InetAddress.
Configure Jakarta Mail's SOCKS host with the same loopback literal so IPv4/IPv6 families cannot diverge.
Add regression coverage for loopback binding and authenticated-proxy delivery.
Correct proxy documentation once the implementation is fixed.
Acceptance criteria
Bridge listener is loopback-only.
Jakarta Mail SOCKS host and bridge address match.
Authenticated proxy delivery still works.
Documentation accurately states the binding behavior.
Fixed: the temporary authenticated SOCKS bridge now binds only to the JVM loopback address, and Jakarta Mail uses that same explicit loopback address. This removes the wildcard listener and avoids IPv4/IPv6 ambiguity around localhost.
The configuration and feature documentation now make clear that the bridge is an internal implementation detail, not a general-purpose proxy.
Activity
bbottema commentedon Aug 5, 2026
Fixed: the temporary authenticated SOCKS bridge now binds only to the JVM loopback address, and Jakarta Mail uses that same explicit loopback address. This removes the wildcard listener and avoids IPv4/IPv6 ambiguity around
localhost.The configuration and feature documentation now make clear that the bridge is an internal implementation detail, not a general-purpose proxy.
bbottema commentedon Aug 8, 2026
This issue's change is now available in Simple Java Mail 9.2.0 and from Maven Central.