CVE-2026-124302: Net::Server::Proto::SSLEAY versions through 2.018 for Perl free the TLS session twice when a client socket is closed a second time, as a PSGI streaming response does Robert Rothenberg 29 Nov 2026 23:46 UTC

========================================================================
CVE-2026-124302                                      CPAN Security Group
========================================================================

         CVE ID:  CVE-2026-124302

   Distribution:  Net-Server
       Versions:  through 2.018
       MetaCPAN:  https://metacpan.org/dist/Net-Server
       VCS Repo:  https://github.com/rhandom/perl-net-server

Net::Server::Proto::SSLEAY versions through 2.018 for Perl free the TLS
session twice when a client socket is closed a second time, as a PSGI
streaming response does

Description
-----------
Net::Server::Proto::SSLEAY versions through 2.018 for Perl free the TLS
session twice when a client socket is closed a second time, as a PSGI
streaming response does.

close frees the session handle stored on the client socket but leaves
the stale pointer in place, so a second close shuts down and frees it
again. Net::Server::PSGI hands the client socket to the application as
the streaming writer. Closing the writer, as the PSGI specification
asks, is the first close, and the server closes the client again after
the request.

A remote client that requests a streaming endpoint of a PSGI server on
proto ssleay corrupts the heap of the server process, which then
crashes. A Single server stops.

Problem types
-------------
- CWE-415 Double Free

Workarounds
-----------
No fixed release is available. Apply the patch. For deployments that
cannot apply the patch, terminate TLS in a reverse proxy and run the
server on proto tcp.

References
----------
https://metacpan.org/release/BBB/Net-Server-2.018/source/lib/Net/Server/Proto/SSLEAY.pm
https://metacpan.org/release/BBB/Net-Server-2.018/source/lib/Net/Server/PSGI.pm
https://security.metacpan.org/patches/N/Net-Server/2.018/CVE-2026-124302-r1.patch