Skip to content

Commit afbd244

Browse files
committed
[UNDERTOW-2598] CVE-2025-9784 Prevent the dispatch of an exchange if the connection has been closed
Signed-off-by: Flavia Rainone <frainone@redhat.com>
1 parent 4610806 commit afbd244

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/java/io/undertow/server/HttpServerExchange.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,10 @@ public HttpServerExchange dispatch(final Executor executor, final HttpHandler ha
893893
final Runnable runnable = new Runnable() {
894894
@Override
895895
public void run() {
896+
// avoid dispatching when the connection is no longer opened
897+
if (!connection.isOpen()) {
898+
return;
899+
}
896900
Connectors.executeRootHandler(handler, HttpServerExchange.this);
897901
}
898902
};

0 commit comments

Comments
 (0)