CVE-2022-4967 in strongSwan
Summary
by MITRE • 05/14/2024
strongSwan versions 5.9.2 through 5.9.5 are affected by authorization bypass through improper validation of certificate with host mismatch (CWE-297). When certificates are used to authenticate clients in TLS-based EAP methods, the IKE or EAP identity supplied by a client is not enforced to be contained in the client's certificate. So clients can authenticate with any trusted certificate and claim an arbitrary IKE/EAP identity as their own. This is problematic if the identity is used to make policy decisions. A fix was released in strongSwan version 5.9.6 in August 2022 (e4b4aabc4996fc61c37deab7858d07bc4d220136).
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 11/06/2025
The vulnerability described in CVE-2022-4967 represents a critical authorization bypass flaw within strongSwan versions 5.9.2 through 5.9.5 that directly impacts the integrity of certificate-based authentication mechanisms. This issue stems from improper validation of certificates when used in TLS-based EAP methods, creating a fundamental weakness in the authentication process where the system fails to enforce proper correlation between the client's claimed identity and the certificate presented. The vulnerability specifically affects the IKE (Internet Key Exchange) and EAP (Extensible Authentication Protocol) identity validation process, where the system should verify that the identity supplied by a client matches the identity contained within the certificate.
The technical flaw manifests when strongSwan processes client authentication using certificates in TLS-based EAP methods such as EAP-TLS or EAP-PEAP. The system correctly validates the certificate's authenticity and trust chain but fails to enforce that the IKE/EAP identity claimed by the client must be present within the certificate's subject or subject alternative name fields. This allows an attacker to present any trusted certificate from the certificate authority's trust store while simultaneously claiming any arbitrary IKE/EAP identity. The certificate validation process becomes a mere formality, as the system accepts the certificate without verifying that the identity assertion aligns with the certificate's contents, creating a dangerous mismatch between authentication and authorization.
This authorization bypass has significant operational impact on systems relying on certificate-based authentication for network access control and policy enforcement. When the authentication system accepts any certificate while allowing arbitrary identity claims, it undermines the entire security model, particularly in environments where identities are used to determine access rights, resource allocation, and policy decisions. Attackers can exploit this vulnerability to gain unauthorized access to network resources by simply presenting a valid certificate from the trust store while claiming an identity with elevated privileges or access rights. The implications extend beyond simple unauthorized access to include potential privilege escalation and lateral movement within the network infrastructure, as the system cannot properly validate that the claimed identity matches the certificate's authority.
The vulnerability maps directly to CWE-297, which specifically addresses "Improper Validation of Certificate with Host Mismatch," and aligns with ATT&CK technique T1552.001 for "Credentials from Password Stores" and T1078.002 for "Valid Accounts: Domain Accounts," as it enables attackers to impersonate legitimate users by leveraging valid certificates. The fix implemented in strongSwan version 5.9.6 addresses this by enforcing proper validation of the certificate's subject identity against the claimed IKE/EAP identity, ensuring that the system validates not only certificate authenticity but also the correlation between certificate contents and identity assertions. Organizations should immediately upgrade to version 5.9.6 or later to remediate this vulnerability, while also implementing additional monitoring to detect potential exploitation attempts. The fix represents a critical security enhancement that restores the intended security model where certificate-based authentication properly validates both the certificate's authenticity and the identity's legitimacy, preventing attackers from exploiting the certificate validation gap to bypass authorization controls.