Buffer Overflow Vulnerability in StrongSwan: CVE-2018-17540

strongswan Updated 02 Oct 2025

Summary

03/10/2018
N/A
Yes i
High
7.5

ALPINE-CVE-2018-17540: The gmp plugin in strongSwan before 5.7.1 has a Buffer Overflow via a crafted certificate. Affects strongswan versions < 5.7.1-r0. Fixed in 5.7.1-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

StrongSwan is an open-source IPsec-based VPN solution that provides secure communication over the internet. It is widely used for establishing secure connections and is known for its flexibility and support for various protocols. The package is designed to handle encryption and authentication, making it a critical component in many network infrastructures. However, it has been identified that certain versions of StrongSwan are vulnerable to a buffer overflow issue, which can be exploited through crafted certificates.

Vulnerability Detail

The vulnerability, identified as CVE-2018-17540, originates from the gmp plugin in StrongSwan versions prior to 5.7.1. It allows an attacker to exploit a buffer overflow by sending a specially crafted certificate to the server. This can lead to arbitrary code execution, potentially compromising the integrity and confidentiality of the system. The CVSS score for this vulnerability is 7.5, indicating a high severity level, which necessitates immediate attention from users of affected versions.

How To Fix

Minimum fixed version

5.7.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade strongswan

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid processing certificates that are not from trusted sources until the package is updated. This can help mitigate the risk of exploitation while a permanent fix is being implemented.

Conclusion

The buffer overflow vulnerability in StrongSwan, identified as CVE-2018-17540, poses significant risks to users of affected versions. It is crucial to update to the patched version 5.7.1 or later to mitigate these risks. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities in your software effectively.

See every vulnerability recorded for strongswan →

Share this vulnerability

FAQ

CVE-2018-17540 is a buffer overflow vulnerability in the gmp plugin of StrongSwan that can be exploited through crafted certificates.

You can check your version of StrongSwan by running 'strongswan version' in your terminal. If it is below 5.7.1, it is vulnerable.

Exploitation of this vulnerability can lead to arbitrary code execution, which may compromise the system's security and data integrity.

Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just a manifest file like package-lock.json.

Detailed information can be found in the CVE database or by visiting the official StrongSwan website.

How To Fix

Minimum fixed version

5.7.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade strongswan

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback