CVE-2025-58369
JSON

5.3medium

fs2: Half-shutdown of socket during TLS handshake may result in spin loop on opposite side

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.50% (higher than 44% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rrw2-px9j-qffj

Description

fs2 is a compositional, streaming I/O library for Scala. Versions up to and including 2.5.12, 3.0.0-M1 through 3.12.2, and 3.13.0-M1 through 3.13.0-M6 are vulnerable to denial of service attacks though TLS sessions using fs2-io on the JVM using the fs2.io.net.tls package. When establishing a TLS session, if one side of the connection shuts down `write` while the peer side is awaiting more data to progress the TLS handshake, the peer side will spin loop on the socket read, fully utilizing a CPU. The CPU is consumed until the overall connection is closed, potentially shutting down a fs2-io powered server. This issue is fixed in versions 2.5.13, 3.12.1, and 3.13.0-M7.

Affected

Product or packageVersionsReported by
typelevel fs2>= 3.0.0-M1, < 3.12.2, >= 3.13.0-M1, < 3.13.0-M7, < 2.5.13CVE List
co.fs2:fs2-io_2.12 (Maven)from 3.0.0-M1 before 3.12.2, from 3.13.0-M1 before 3.13.0-M7, before 2.5.13GitHub Advisory Database
co.fs2:fs2-io_2.13 (Maven)from 3.0.0-M1 before 3.12.2, from 3.13.0-M1 before 3.13.0-M7, before 2.5.13GitHub Advisory Database
co.fs2:fs2-io_3 (Maven)from 3.0.0-M1 before 3.12.2, from 3.13.0-M1 before 3.13.0-M7, before 2.5.13GitHub Advisory Database
co.fs2:fs2-io_0.26 (Maven)all versionsGitHub Advisory Database
co.fs2:fs2-io_0.27 (Maven)all versionsGitHub Advisory Database
co.fs2:fs2-io_2.11 (Maven)all versionsGitHub Advisory Database
co.fs2:fs2-io_2.12.0-M4 (Maven)all versionsGitHub Advisory Database
co.fs2:fs2-io_2.12.0-RC1 (Maven)all versionsGitHub Advisory Database
co.fs2:fs2-io_2.12.0-M5 (Maven)all versionsGitHub Advisory Database
co.fs2:fs2-io_2.12.0-RC2 (Maven)all versionsGitHub Advisory Database
co.fs2:fs2-io_2.13.0-M5 (Maven)all versionsGitHub Advisory Database

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Classification

CWE-400

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

fs2 is a compositional, streaming I/O library for Scala. Versions up to and including 2.5.12, 3.0.0-M1 through 3.12.2, and 3.13.0-M1 through 3.13.0-M6 are vulnerable to denial of service attacks though TLS sessions using fs2-io on the JVM using the fs2.io.net.tls package. When establishing a TLS session, if one side of the connection shuts down `write` while the peer side is awaiting more data to progress the TLS handshake, the peer side will spin loop on the socket read, fully utilizing a CPU. The CPU is consumed until the overall connection is closed, potentially shutting down a fs2-io powered server. This issue is fixed in versions 2.5.13, 3.12.1, and 3.13.0-M7.

GitHub Advisory Database
Impact

When establishing a TLS session using fs2-io on the JVM using the fs2.io.net.tls package, if one side of the connection shuts down write while the peer side is awaiting more data to progress the TLS handshake, the peer side will spin loop on the socket read, fully utilizing a CPU. This CPU is consumed until the overall connection is closed.

This could be used as a denial of service attack on an fs2-io powered server -- for example, by opening many connections and putting them in a half-shutdown state.

Note: this issue impacts ember backed http4s servers with HTTPS as a result of ember using fs2's TLS support.

Patches

Fixed in fs2 3.12.2 and 3.13.0-M7.

Workarounds

No workarounds.

For more information

If you have any questions or comments about this advisory:

Open an issue. Contact the Typelevel Security Team.

NVD (es)

fs2 es una biblioteca de E/S composicional y de streaming para Scala. Las versiones hasta la 2.5.12 inclusive, de la 3.0.0-M1 a la 3.12.2, y de la 3.13.0-M1 a la 3.13.0-M6 son vulnerables a ataques de denegación de servicio a través de sesiones TLS usando fs2-io en la JVM utilizando el paquete fs2.io.net.tls. Al establecer una sesión TLS, si un lado de la conexión cierra la 'escritura' mientras el lado par está esperando más datos para avanzar el handshake TLS, el lado par entrará en un bucle de espera activa en la lectura del socket, utilizando completamente una CPU. La CPU es consumida hasta que la conexión general se cierra, potencialmente apagando un servidor impulsado por fs2-io. Este problema está solucionado en las versiones 2.5.13, 3.12.1 y 3.13.0-M7.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-58369 changed 2025-11-07CVE Terms of Use
GitHub Advisory DatabaseGHSA-rrw2-px9j-qffj changed 2025-11-07CC-BY-4.0
NVDCVE-2025-58369 changed 2026-10-01Public domain