The Libreswan Project libreswan
Null Pointer Dereference in PKCS#7 bundle with no certificates
Libreswan has a null pointer dereference bug in the PKCS#7 handling code for IKE certificate authentication. When libreswan decodes an IKE CERT payload of type CERT_PKCS7_WRAPPED_X509, it guards the PKCS#7 blob with SEC_PKCS7ContainsCertsOrCrls() and then iterates the certificate list with SEC_PKCS7GetCertificateList(). The two NSS APIs disagree on a SignedData that carries a CRL but no certificates: ContainsCertsOrCrls() returns PR_TRUE (there is a CRL), so the guard passes, but GetCertificateList() returns NULL (there are no certificates). This causes libreswan to dereference a null pointer leading to a crash and restart. A malicious IKE_AUTH packet can trigger this bug, meaning the peer does not need to be authenticated. No remote code execution is possible. Continued exploitation can cause a denial of service.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4.7, <= 5.3.2
- >= 5.4, <= 5.4
Fixed in 5.3.3, 5.4.1
Mitigation
Upgrade to libreswan 5.3.3 or 5.4.1 or later. Patches are available at https://libreswan.org/security/CVE-2026-77207/
Workaround
Apply the available patch or upgrade to a supported version. No configuration-based workaround is available.
References
- Vendor advisory libreswan.org/security/CVE-2026-77207/CVE-2026-77…
- Patch libreswan.org/security/CVE-2026-77207
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.