CVE-2021-41991
Description
An integer overflow in the in-memory certificate cache of strongSwan before 5.9.4 can lead to a denial-of-service or possibly remote code execution.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An integer overflow in the in-memory certificate cache of strongSwan before 5.9.4 can lead to a denial-of-service or possibly remote code execution.
Vulnerability
The in-memory certificate cache in strongSwan versions 4.2.10 up to 5.9.3 contains an integer overflow bug. The cache stores validated certificate relationships (limited to 32 slots). When the cache is full and a new certificate needs to be inserted, the code attempts to find a less-frequently used slot by iterating starting from a random offset, calculated as int offset = random(). Since random() can return values up to RAND_MAX (typically INT_MAX = 2^31-1), a high value causes an integer overflow when computing (i + offset) % CACHE_SIZE, leading to a negative index and an out-of-bounds array access [1].
Exploitation
An attacker must send thousands of certificate validation requests over roughly a day or two to fill the cache and trigger the vulnerable replacement logic. No authentication is required; the attacker only needs network access to a strongSwan VPN gateway or client that has the certificate cache enabled (which is the default). The random nature of the overflow means exploitation is not deterministic, but an attacker might eventually cause the out-of-bounds access [1].
Impact
Successful exploitation most likely results in a segmentation fault, causing a denial-of-service (DoS) of the strongSwan daemon. The vendor states that "remote code execution might be a slight possibility" [1], though the primary impact is service disruption.
Mitigation
The vulnerability is fixed in strongSwan version 5.9.4 [2]. Users should upgrade to 5.9.4 or later. As a workaround, the certificate cache can be disabled (though this may impact performance). No workaround is otherwise provided by the vendor. The CVE is not listed on the CISA Known Exploited Vulnerabilities (KEV) catalog as of the publication date.
AI Insight generated on May 27, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
36- strongSwan/strongSwandescription
- Range: <5.9.4
- osv-coords34 versionspkg:rpm/opensuse/strongswan&distro=openSUSE%20Leap%2015.2pkg:rpm/opensuse/strongswan&distro=openSUSE%20Leap%2015.3pkg:rpm/opensuse/strongswan&distro=openSUSE%20Tumbleweedpkg:rpm/suse/strongswan&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/strongswan&distro=SUSE%20Enterprise%20Storage%206pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-ESPOSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-ESPOSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP2pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP3pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP2pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP3pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Point%20of%20Sale%2011%20SP3pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-BCLpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP3-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-BCLpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%2015-LTSSpkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP3pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2015%20SP2pkg:rpm/suse/strongswan&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2015%20SP3pkg:rpm/suse/strongswan&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/strongswan&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/strongswan&distro=SUSE%20OpenStack%20Cloud%20Crowbar%208pkg:rpm/suse/strongswan&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209
< 5.8.2-lp152.2.18.1+ 33 more
- (no CPE)range: < 5.8.2-lp152.2.18.1
- (no CPE)range: < 5.8.2-11.21.1
- (no CPE)range: < 5.9.4-1.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-11.21.1
- (no CPE)range: < 5.8.2-11.21.1
- (no CPE)range: < 5.8.2-11.21.1
- (no CPE)range: < 5.8.2-11.21.1
- (no CPE)range: < 4.4.0-6.36.9.1
- (no CPE)range: < 4.4.0-6.36.9.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-4.14.2
- (no CPE)range: < 5.8.2-11.21.1
- (no CPE)range: < 5.8.2-11.21.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
- (no CPE)range: < 5.1.3-26.16.1
Patches
0No patches discovered yet.
Vulnerability mechanics
No source-code context for this CVE — mechanics is only generated when we can read the actual fix diff. Without that, the four sections (root cause, attack vector, affected code, fix) would be speculation rather than analysis.
References
8- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5FJSATD2R2XHTG4P63GCMQ2N7EWKMME5/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WQSQ3BEC22NF4NCDZVCT4P3Q2ZIAJXGJ/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Y3TQ32JLJOBJDB2EJKSX2PBPB5NFG2D4/mitrevendor-advisoryx_refsource_FEDORA
- www.debian.org/security/2021/dsa-4989mitrevendor-advisoryx_refsource_DEBIAN
- cert-portal.siemens.com/productcert/pdf/ssa-539476.pdfmitrex_refsource_CONFIRM
- github.com/strongswan/strongswan/releases/tag/5.9.4mitrex_refsource_MISC
- lists.debian.org/debian-lts-announce/2021/10/msg00014.htmlmitremailing-listx_refsource_MLIST
- www.strongswan.org/blog/2021/10/18/strongswan-vulnerability-%28cve-2021-41991%29.htmlmitrex_refsource_CONFIRM
News mentions
0No linked articles in our index yet.