LibreswanApplication

CVE-2026-50721

MEDIUM · 5.9 CVSS v3.1 Published 2026-07-02
Fix available
A fix is available. Upgrade to 5.3.1 or later.
See remediation →
68/100
Remediation priority · Elevated
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Libreswan, via the function RSA_authenticate_hash_signature_raw_rsa(), did not correctly verify the length of the authentication hash when the SIG payload of an IKEv1 packet was encoded using PKCS #1 RSA Encryption as per RFC 2313. A remote attacker can use a variation on the Bleichenbacher attack to forge the SIG payload when small public exponents are being used (e.g., e=3), which could lead to impersonation. Additionally, a remote attacker, by encoding a shorter than expected hash in the SIG payload, could trigger an assertion leading to denial-of-service. The daemon aborts and restarts; continued exploitation causes sustained denial of service. Remote code execution is not possible. X.509 certificate verifications of remote IKE peers are not affected.

In the news

Third-party coverage
Trending covered by 1 outlet this week · latest 4mo ago

Surfaced from public web coverage — external links open in a new tab.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Libreswan's RSA_authenticate_hash_signature_raw_rsa() function fails to properly verify the authentication hash length in IKEv1 SIG payloads using PKCS #1 RSA Encryption (RFC 2313). This allows attackers to exploit a Bleichenbacher-style attack with small public exponents (e=e3) to forge signatures and impersonate IKE peers, or trigger assertion failures causing daemon crashes and sustained DoS.

MitigationUpgrade to a Libreswan version that fixes the hash length verification in RSA_authenticate_hash_signature_raw_rsa(). Avoid using small RSA public exponents (e=3) for IKEv1 peer authentication and monitor for repeated daemon restarts indicating DoS exploitation.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
LibreswanApplication
Affected:< 5.3.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Libreswan version
    Run 'ipsec --version' or check the package manager for libreswan version (e.g., 'rpm -q libreswan' or 'dpkg -l | grep libreswan')
    Affected if The version is lower than 5.3.1
  2. Verify IKEv1 is in use
    Review /etc/ipsec.conf and look for 'ike' or 'phase1' directives that specify IKEv1 (version 1) parameters, or check active connections with 'ipsec status'
    Affected if IKEv1 connections are configured and active; the vulnerability only affects IKEv1 SIG payloads using PKCS #1 RSA Encryption
  3. Identify RSA-authenticated IKEv1 connections
    Examine /etc/ipsec.d/ and /etc/ipsec.conf for connections using 'RSA' authentication method (often 'authby=rsasig') in IKEv1 context
    Affected if Connections with 'authby=rsasig' or similar RSA authentication are configured for IKEv1
  4. Inspect RSA public exponent values
    Check RSA private keys in /etc/ipsec.d/private/ using 'openssl rsa -in <keyfile> -text -noout' and examine the 'Exponent' value
    Affected if The RSA public exponent (e) equals 3 (e=3), which enables the Bleichenbacher-style attack vector
  5. Monitor for daemon crashes or restarts
    Review system logs (journalctl -u ipsec, /var/log/daemon.log, /var/log/messages) for 'pluto' daemon assertion failures or unexpected restarts
    Affected if Repeated IKE daemon (pluto) crashes or restarts are logged, indicating possible DoS exploitation

You are affected if running Libreswan below version 5.3.1 with IKEv1 connections using RSA authentication, especially with small public exponent (e=3) keys.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 5.3.1 or later
Fixed in 5.3.1
Interim mitigation

Upgrade to a Libreswan version that fixes the hash length verification in RSA_authenticate_hash_signature_raw_rsa(). Avoid using small RSA public exponents (e=3) for IKEv1 peer authentication and monitor for repeated daemon restarts indicating DoS exploitation.

Recommended fix High confidence

Libreswan 5.3.1 or later

  1. 1. Identify the current installed version of Libreswan using 'ipsec --version' or checking the package manager
  2. 2. For systems using package managers (yum, dnf, apt), update the package: 'yum update libreswan' or 'dnf update libreswan' or 'apt-get update && apt-get upgrade libreswan'
  3. 3. For source installations, download Libreswan 5.3.1 or later from the official repository (download.libreswan.org)
  4. 4. Rebuild and reinstall from source following the standard build process
  5. 5. Restart the IPsec service: 'systemctl restart ipsec' or 'service ipsec restart'
  6. 6. Verify the new version is installed: 'ipsec --version'
  7. 7. Test IKEv1 connections to ensure they function correctly after the upgrade

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Libreswan Scoped from the published advisory
  • Consultation6.0 h
  • Implementation12.0 h
  • Testing10.0 h
  • Review / QA6.0 h
34.0 hours of engineering $5,940
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $9,504.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-50721 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-50721 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data