Critical Vulnerability in Libreswan: ASN.1 Digest Verification Flaw
Summary
DEBIAN-CVE-2026-50722: Libreswan, via the function RSA_authenticate_hash_signature_pkcs1_1_5_rsa(), did not correctly verify the DER encoding of the ASN.1 digest when the IKEv2 AUTH payload was encoded using RSASSA-PKCS1-v1_5 (RFC 8017). Affects libreswan versions 4.10-1 – 5.2-2.4. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Libreswan is an open-source implementation of the Internet Key Exchange (IKE) and IPsec protocols, widely used for secure communication over the internet. It provides essential functionalities for establishing secure VPN connections and ensuring data integrity and confidentiality. However, recent findings have revealed a significant vulnerability in its handling of ASN.1 digest verification, which could potentially expose users to impersonation attacks and denial-of-service scenarios.
Vulnerability Detail
The vulnerability arises from Libreswan's failure to correctly verify the DER encoding of the ASN.1 digest within the IKEv2 AUTH payload when using RSASSA-PKCS1-v1_5 encoding. This flaw allows remote attackers to exploit a variation of the Bleichenbacher attack, particularly when small public exponents (e.g., e=3) are used, leading to the possibility of forging AUTH payloads. Additionally, attackers can trigger an assertion failure by encoding a shorter than expected hash, resulting in denial-of-service conditions as the daemon aborts and restarts. While remote code execution is not possible, the impact on service availability is significant, making this a critical vulnerability.
How To Fix
No fixed version is published for this vulnerability.
To rectify this vulnerability, it is essential to update Libreswan to the latest patched version. Users can do this by executing the following commands in their terminal:
- Update the package list:
sudo apt update
- Upgrade Libreswan:
sudo apt upgrade libreswan
Ensure that you are running a version that addresses this vulnerability. Check the official Debian repositories for the latest updates.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users may consider implementing additional network security measures, such as restricting access to the IKEv2 service from untrusted networks or using alternative authentication methods until the package can be updated.
Conclusion
The vulnerability in Libreswan regarding ASN.1 digest verification poses significant risks, including impersonation and denial-of-service attacks. Users are strongly advised to update their installations to the latest patched version to mitigate these risks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for libreswan →
FAQ
The CVSS score of this vulnerability is 8.1, indicating a high severity level.
No, this vulnerability does not allow for remote code execution; however, it can lead to impersonation and denial-of-service.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
If immediate updates are not feasible, consider implementing network security measures to limit exposure and mitigate potential risks.
Yes, all versions of Libreswan are affected by this vulnerability, and it is crucial to update to the latest patched version.
References
Related vulnerabilities
Recent vulnerabilities recorded for libreswan.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.