Skip to content

FS2 half-shutdown of socket during TLS handshake may result in spin loop on opposite side

Moderate severity GitHub Reviewed Published Sep 5, 2025 in typelevel/fs2 • Updated Sep 5, 2025

Package

maven co.fs2:fs2-io_0.26 (Maven)

Affected versions

< 3.12.2

Patched versions

None
maven co.fs2:fs2-io_0.27 (Maven)
< 3.12.2
None
maven co.fs2:fs2-io_2.11 (Maven)
< 3.12.2
None
maven co.fs2:fs2-io_2.12 (Maven)
< 3.12.2
>= 3.13.0-M1, < 3.13.0-M7
3.12.2
3.13.0-M7
maven co.fs2:fs2-io_2.12.0-M4 (Maven)
< 3.12.2
None
maven co.fs2:fs2-io_2.12.0-M5 (Maven)
< 3.12.2
None
maven co.fs2:fs2-io_2.12.0-RC1 (Maven)
< 3.12.2
None
maven co.fs2:fs2-io_2.12.0-RC2 (Maven)
< 3.12.2
None
maven co.fs2:fs2-io_2.13 (Maven)
< 3.12.2
>= 3.13.0-M1, < 3.13.0-M7
3.12.2
3.13.0-M7
maven co.fs2:fs2-io_2.13.0-M5 (Maven)
< 3.12.2
None
maven co.fs2:fs2-io_3 (Maven)
< 3.12.2
>= 3.13.0-M1, < 3.13.0-M7
3.12.2
3.13.0-M7

Description

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.

References

@mpilquist mpilquist published to typelevel/fs2 Sep 5, 2025
Published to the GitHub Advisory Database Sep 5, 2025
Reviewed Sep 5, 2025
Last updated Sep 5, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

EPSS score

Weaknesses

Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. Learn more on MITRE.

CVE ID

CVE-2025-58369

GHSA ID

GHSA-rrw2-px9j-qffj

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.