Heap Buffer Overflow Vulnerability in pyodbc Package

pyodbc Updated 02 Oct 2025

Summary

27/05/2025
MEDIUM
No i
Medium
Not published

OSV-2025-409: Heap-buffer-overflow in libodbc.so.2. Affected versions are not published. No fix is published. 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

pyodbc is a Python DB API 2 module for ODBC, allowing Python applications to connect to databases using ODBC drivers. It provides a simple interface for executing SQL commands and retrieving results. However, it is susceptible to vulnerabilities that can lead to security risks, such as buffer overflows, which can compromise the integrity of applications using this package.

Vulnerability Detail

The vulnerability identified as OSV-2025-409 is a heap-buffer-overflow in the libodbc.so.2 library, which can lead to unauthorized access to memory and potential application crashes. This issue arises from improper handling of memory buffers, allowing attackers to exploit the overflow to read beyond allocated memory boundaries. The crash type reported is a READ operation, indicating that sensitive data may be exposed or that the application may become unstable.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can limit the use of the affected functions in your application until the package is updated. Additionally, consider implementing input validation to prevent unexpected data from being processed by the library.

Conclusion

The heap-buffer-overflow vulnerability in the pyodbc package poses significant risks to applications relying on this library. It is crucial to update to the latest version to mitigate these risks and ensure the security of your application. Regular monitoring of dependencies using tools like Vulert can help maintain a secure software environment.

See every vulnerability recorded for pyodbc →

Share this vulnerability

FAQ

A heap-buffer-overflow occurs when a program writes more data to a buffer located on the heap than it can hold, potentially overwriting adjacent memory and leading to unpredictable behavior.

Exploitation of this vulnerability can lead to application crashes, data corruption, or unauthorized access to sensitive information, compromising the security of your application.

Yes, a patched version of the pyodbc package is available. It is recommended to update to the latest version to mitigate the risk.

You can use tools like Vulert, which monitors and alerts for open-source vulnerabilities in your software by analyzing the Pipfile.lock without requiring code access or installation.

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

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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