SQL Injection Vulnerability in libphp-adodb: Improper Escaping of Query Parameters

libphp-adodb Updated 02 Oct 2025

Summary

05/08/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2025-54119: ADOdb is a PHP database class library that provides abstractions for performing queries and managing databases. Affects libphp-adodb versions < 5.22.10-0.1. Fixed in 5.22.10-0.1. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

libphp-adodb is a PHP database class library designed to provide abstractions for executing queries and managing various database systems. It supports multiple database types, including MySQL, PostgreSQL, and SQLite. The library is widely used in PHP applications for its ease of use and flexibility. However, certain versions of libphp-adodb have been found to be vulnerable to SQL injection attacks due to improper handling of query parameters when interacting with SQLite databases.

Vulnerability Detail

The vulnerability arises from improper escaping of a query parameter in versions 5.22.9 and below of libphp-adodb. When the library connects to a SQLite3 database and calls the metaColumns(), metaForeignKeys(), or metaIndexes() methods with a crafted table name, an attacker can execute arbitrary SQL statements. This can lead to unauthorized data access, data manipulation, or even complete database compromise, making it critical for users to address this issue promptly.

How To Fix

Minimum fixed version

5.22.10-0.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libphp-adodb

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

Workaround

As a temporary workaround, ensure that only controlled data is passed to the $table parameter of the metaColumns(), metaForeignKeys(), and metaIndexes() methods. For example, validate and sanitize the input before passing it to these methods to prevent injection attacks. Here is a sample code snippet for validation:

if (preg_match('/^[a-zA-Z0-9_]+$/', $table)) {
    // Safe to use $table
} else {
    // Handle invalid table name
}

Conclusion

The SQL injection vulnerability in libphp-adodb poses significant risks to applications using affected versions. It is crucial for developers and system administrators to update to the patched version and implement the recommended workarounds to safeguard their databases from potential attacks.

See every vulnerability recorded for libphp-adodb →

Share this vulnerability

FAQ

The vulnerability is an SQL injection flaw caused by improper escaping of query parameters in specific methods when interacting with SQLite databases.

Versions 5.22.9 and below are affected by this vulnerability.

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

If exploited, this vulnerability could allow attackers to execute arbitrary SQL statements, potentially leading to unauthorized access or manipulation of the database.

Yes, the vulnerability has been fixed in version 5.22.10-0.1 of libphp-adodb. Users are advised to update to this version or later.

Related vulnerabilities

Recent vulnerabilities recorded for libphp-adodb.

How To Fix

Minimum fixed version

5.22.10-0.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libphp-adodb

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