Skip to content
Memory corruption Advisory Advanced CVE-2023-27395

SoftEther VPN vpnserver WpcParsePacket() heap-based buffer overflow vulnerability

A heap-based buffer overflow in SoftEther VPN's WpcParsePacket() allows an attacker who can intercept network traffic to execute arbitrary code. The flaw arises because a size field is taken from the packet and used without proper bounds checking, leading to a user-controlled overflow.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 9.0 View original

A heap-based buffer overflow vulnerability exists in the vpnserver WpcParsePacket() functionality of SoftEther VPN 4.41-9782-beta, 5.01.9674 and 5.02. A specially crafted network packet can lead to arbitrary code execution.

Lilith >_>, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker who can perform a man-in-the-middle attack could execute arbitrary code on the VPN server.

What the attacker needed

Man-in-the-middle position

The fix

The vendor issued an advisory and patch release.

How it was found

  1. The VPN server periodically sends a registration request to the DDNS server.
  2. An attacker intercepts the response and replaces it with a crafted packet containing a PACK entry with size zero and a long string of 'B's.
  3. The server parses the packet, and due to the zero size, the actual length is taken from the string, causing a buffer overflow during base64 decoding.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

SoftEther VPN is a program that lets you create secure connections over the internet. A part of it that talks to a central server can be tricked into writing more data than it has space for, which can crash the program or let an attacker run their own code. The attacker needs to be able to intercept and modify the network traffic between the VPN server and the central server.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Lilith >_>

View all

148 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.