{"id":"ALPINE-CVE-2021-41991","details":"The in-memory certificate cache in strongSwan before 5.9.4 has a remote integer overflow upon receiving many requests with different certificates to fill the cache and later trigger the replacement of cache entries. The code attempts to select a less-often-used cache entry by means of a random number generator, but this is not done correctly. Remote code execution might be a slight possibility.","modified":"2025-12-03T22:48:59.643844Z","published":"2021-10-18T14:15:10.333Z","upstream":["CVE-2021-41991"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2021-41991"}],"affected":[{"package":{"name":"strongswan","ecosystem":"Alpine:v3.12","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.8.4-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.13","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r1"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.14","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r2"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.15","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.16","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.17","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r0","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.18","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r0","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.19","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r0","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.20","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r0","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r0","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r0","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}},{"package":{"name":"strongswan","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/strongswan?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.9.1-r3"}]}],"versions":["4.5.2-r0","4.6.1-r0","5.1.1-r0","5.1.1-r1","5.1.1-r2","5.1.1-r3","5.1.3-r0","5.2.0-r0","5.2.0-r1","5.2.0-r2","5.2.2-r0","5.3.0-r0","5.3.0-r1","5.3.0-r2","5.3.1-r0","5.3.1-r1","5.3.1-r2","5.3.2-r0","5.3.2-r1","5.3.2-r10","5.3.2-r2","5.3.2-r3","5.3.2-r4","5.3.2-r5","5.3.2-r6","5.3.2-r7","5.3.2-r8","5.3.2-r9","5.3.3-r0","5.3.4-r0","5.3.5-r0","5.3.5-r1","5.3.5-r2","5.4.0-r0","5.4.0-r1","5.5.0-r0","5.5.0-r1","5.5.1-r0","5.5.1-r1","5.5.2-r0","5.5.2-r1","5.5.3-r0","5.5.3-r1","5.6.0-r0","5.6.0-r1","5.6.1-r0","5.6.2-r0","5.6.2-r1","5.6.3-r0","5.6.3-r1","5.6.3-r2","5.7.0-r0","5.7.1-r0","5.7.1-r1","5.7.1-r2","5.7.2-r0","5.7.2-r1","5.8.0-r0","5.8.0-r1","5.8.1-r0","5.8.1-r1","5.8.2-r0","5.8.3-r0","5.8.4-r0","5.8.4-r1","5.8.4-r2","5.9.0-r0","5.9.0-r1","5.9.1-r0","5.9.1-r1","5.9.1-r2"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-41991.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}