CVE-2018-5388
strongSwan: Buffer Underwrite
Description
In stroke_socket.c in strongSwan before 5.6.3, a missing packet length check could allow a buffer underflow, which may lead to resource exhaustion and denial of service while reading from the socket.
Exploitation
EPSS 3.92%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 91.0% of all scored CVEs. Scores of 26 Nov 2026.
Weakness
- CWE-124 Buffer Underwrite
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| strongSwan |
affected from 5.6.3, before 5.6.3
|
Is my server affected?
Find the installed version of strongswan and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i strongswan
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2018-5388 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2018-5388RHEL, Rocky, Alma, Fedora
rpm -q strongswan
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2018-5388Alpine
apk list --installed | grep -i strongswanWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2018-5388
trivy image --scanners vuln IMAGE | grep CVE-2018-5388
PatchBrief makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Install the agent.
References
Advisories
- VU#338343 kb.cert.org · third party advisory
- GLSA-201811-16 security.gentoo.org · vendor advisory
- USN-3771-1 usn.ubuntu.com · vendor advisory
- DSA-4229 debian.org · vendor advisory
- openSUSE-SU-2019:2594 lists.opensuse.org · vendor advisory
- openSUSE-SU-2019:2598 lists.opensuse.org · vendor advisory
- openSUSE-SU-2020:0403 lists.opensuse.org · vendor advisory
Other references
- https://git.strongswan.org/?p=strongswan.git%3Ba=commitdiff%3Bh=0acd1ab4 git.strongswan.org
- 104263 securityfocus.com · vdb entry
- http://packetstormsecurity.com/files/172833/strongSwan-VPN-Charon-Server-Buffer-Overflow.html packetstormsecurity.com
Source: the record CVE-2018-5388 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.