Critical Buffer Overflow Vulnerability in libevent: CVE-2016-10196

libevent Updated 02 Oct 2025

Summary

15/03/2017
N/A
Yes i
High
7.5

ALPINE-CVE-2016-10196: Stack-based buffer overflow in the evutil_parse_sockaddr_port function in evutil.c in libevent before 2.1.6-beta allows attackers to cause a denial of service (segmentation fault) via vectors involving a long string in b... Affects libevent versions < 2.1.8-r0. Fixed in 2.1.8-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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libevent is a widely-used library that provides asynchronous I/O for network applications. It allows developers to create scalable network applications by providing a consistent API for handling events across different platforms. The library is essential for applications that require high performance and responsiveness. However, it has been found to be vulnerable to a stack-based buffer overflow, which can lead to severe security implications.

Vulnerability Detail

The vulnerability, identified as CVE-2016-10196, originates from a flaw in the evutil_parse_sockaddr_port function within libevent versions prior to 2.1.6-beta. This flaw allows attackers to exploit the function by supplying a long string in brackets as the ip_as_string argument, leading to a stack-based buffer overflow. The consequences of this vulnerability include potential denial of service (DoS) attacks, where the application may crash due to a segmentation fault, thereby affecting availability and reliability.

How To Fix

Minimum fixed version

2.1.8-r0

This is the first release that contains the fix.

sudo apk add --upgrade libevent

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

Workaround

As a temporary workaround, you can implement input validation to restrict the length of the ip_as_string argument passed to the evutil_parse_sockaddr_port function. This can help mitigate the risk of buffer overflow until the package is updated.

Conclusion

The CVE-2016-10196 vulnerability in libevent poses a significant risk due to its potential for causing denial of service attacks. It is crucial for users of the library to update to the patched version to mitigate this risk. Additionally, implementing input validation can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for libevent →

Share this vulnerability

FAQ

CVE-2016-10196 is a critical vulnerability in the libevent library that allows for a stack-based buffer overflow, potentially leading to denial of service.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The primary impact is a denial of service, where an attacker can crash the application by exploiting the buffer overflow.

Yes, the patched version of libevent is 2.1.8-r0 or later. It is recommended to update to this version.

The CVSS score for CVE-2016-10196 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for libevent.

How To Fix

Minimum fixed version

2.1.8-r0

This is the first release that contains the fix.

sudo apk add --upgrade libevent

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