Critical Vulnerability in Libreswan: ASN.1 Digest Verification Flaw

libreswan Updated 03 Jul 2026

Summary

02/07/2026
N/A
No i
High
8.1

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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:

  1. Update the package list:
   sudo apt update
  1. 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for libreswan.

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:

  1. Update the package list:
   sudo apt update
  1. 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.