AISLE Research reported a bug in the x509 plugin related to the parsing of identities in X.509 attribute certificates that can lead to a denial of service via memory exhaustion.
Memory Leaks When Parsing Attribute Certificates
The x509 plugin doesn't correctly handle multiple GeneralName entries in an attribute certificate's Holder or Issuer fields, nor does it handle multiple AuthorityKeyIdentifier extensions properly, which can cause memory exhaustion over time. Affected are all strongSwan versions since 4.2.0.
CVE-2026-78131 has been assigned for this vulnerability.
Memory Leak When Parsing GeneralNames
The x509 plugin supports parsing attribute certificates that can be used for authorization (see e.g. RFC 5755). Certain identities in such certificates are encoded as GeneralNames (e.g. the entityName in the Holder structure or the issuerName in the Issuer (V2Form) structure).
However, the parse_directoryName() function that parses such an identity processes at most one DirectoryName entry. It enumerates the parsed list of identification_t objects, assigns the first entry to the output parameter, destroys the second entry, and then breaks out of the loop. Any subsequent entries remain in the list and are never freed. An attribute certificate with many GeneralName entries can thus cause a progressive memory leak.
Only versions 5.1.3 or newer are affected by this issue.
Memory Leak When Parsing Multiple AuthorityKeyIdentifier Extensions
In the same file, when parsing extensions in an attribute certificate, a previously parsed AuthorityKeyIdentifier is not freed before the next one is assigned. An attribute certificate with many such extensions causes a progressive memory leak.
Remote code execution is not possible due to either of these issues.
As mentioned in the introduction, credit to AISLE Research for finding this vulnerability and reporting it responsibly.
Mitigation
Installations that don't load the x509 plugin are not vulnerable. Note that it's built and loaded by default.
If the plugin is loaded, attribute certificates are parsed and verified whenever one is received as CERT payload in IKEv2 (encoding type 10). So these leaks affect all such installations.
The just released strongSwan 6.1.0 fixes this vulnerability. For older releases, we provide patches that fix the vulnerability and should apply with appropriate hunk offsets. Please be aware that we don't provide any patches for releases older than 5.1.3.