CVE-2024-2357

IKEv2 misconfiguration can cause libreswan to abort and restart

Description

The Libreswan Project was notified of an issue causing libreswan to restart under some IKEv2 retransmit scenarios when a connection is configured to use PreSharedKeys (authby=secret) and the connection cannot find a matching configured secret. When such a connection is automatically added on startup using the auto= keyword, it can cause repeated crashes leading to a Denial of Service.

Remediation

Solution:

  • This issue is fixed in 4.13, 5.0 and all later versions.

Workaround:

  • As a workaround, one can place an unguessable long random default secret in /etc/ipsec.secrets, for example using the following command: echo -e "# CVE-2024-2357 workaround : PSK "$(openssl rand -hex 32)"" >> /etc/ipsec.secrets This will ensure a PSK secret is always found, but it will always be wrong, and thus authentication will still properly fail.
6.5
CVSS
Severity: Medium
CVSS 3.1 •
EPSS 0.44%
Vendor Advisory libreswan.org
Affected: The Libreswan Project (www.libreswan.org) libreswan
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-2357?
CVE-2024-2357 has been scored as a medium severity vulnerability.
How to fix CVE-2024-2357?
To fix CVE-2024-2357: This issue is fixed in 4.13, 5.0 and all later versions.
Is CVE-2024-2357 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-2357 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-2357?
CVE-2024-2357 affects The Libreswan Project (www.libreswan.org) libreswan.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.