CVE-2025-54119

10.0 CRITICAL

📋 TL;DR

This SQL injection vulnerability in ADOdb allows attackers to execute arbitrary SQL commands when applications connect to SQLite3 databases and call metaColumns(), metaForeignKeys(), or metaIndexes() methods with malicious table names. It affects all PHP applications using ADOdb versions 5.22.9 and below with SQLite3 database connections. The vulnerability has a CVSS score of 10.0, indicating critical severity.

💻 Affected Systems

Products:
  • ADOdb PHP Database Abstraction Library
Versions: 5.22.9 and below
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects SQLite3 database connections. Other database backends (MySQL, PostgreSQL, etc.) are not vulnerable. Requires calling metaColumns(), metaForeignKeys(), or metaIndexes() methods with untrusted input.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise including data theft, data destruction, privilege escalation, and potential remote code execution through SQLite functions.

🟠

Likely Case

Data exfiltration, database manipulation, and potential application compromise depending on database permissions and application context.

🟢

If Mitigated

Limited impact if proper input validation and parameterization are implemented, though the vulnerability still exists in the library.

🌐 Internet-Facing: HIGH - Any web application using vulnerable ADOdb versions with SQLite3 that accepts user input for table names is exposed to remote exploitation.
🏢 Internal Only: MEDIUM - Internal applications are still vulnerable but have reduced attack surface compared to internet-facing systems.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW - Simple SQL injection requiring only a crafted table name parameter.

Exploitation requires the application to pass user-controlled data to the vulnerable methods. The advisory provides technical details but no public exploit code.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.22.10

Vendor Advisory: https://github.com/ADOdb/ADOdb/security/advisories/GHSA-vf2r-cxg9-p7rf

Restart Required: No

Instructions:

1. Update ADOdb to version 5.22.10 or later. 2. Use composer update adodb/adodb-php or manually replace the ADOdb library files. 3. Verify the update by checking the version in ADOdb.php or using the version constant.

🔧 Temporary Workarounds

Input Validation Workaround

all

Validate and sanitize all table name inputs before passing to metaColumns(), metaForeignKeys(), and metaIndexes() methods.

// Example PHP validation
$table = $_GET['table'];
if (!preg_match('/^[a-zA-Z0-9_]+$/', $table)) {
    die('Invalid table name');
}
$db->metaColumns($table);

🧯 If You Can't Patch

  • Implement strict input validation for all table name parameters passed to metaColumns(), metaForeignKeys(), and metaIndexes() methods.
  • Switch to alternative database backends (MySQL, PostgreSQL) instead of SQLite3 if possible, as the vulnerability only affects SQLite3 connections.

🔍 How to Verify

Check if Vulnerable:

Check if ADOdb version is 5.22.9 or below and application uses SQLite3 database connections with metaColumns(), metaForeignKeys(), or metaIndexes() methods.

Check Version:

grep -r "ADOdb Version" /path/to/adodb/ADOdb.php or check ADODB_VERSION constant in PHP code

Verify Fix Applied:

Verify ADOdb version is 5.22.10 or later and test that table name inputs are properly escaped in the vulnerable methods.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in SQLite logs
  • Multiple failed queries with malformed table names
  • Unexpected metaColumns/metaForeignKeys/metaIndexes calls

Network Indicators:

  • SQL injection patterns in HTTP parameters
  • Unusual database connection patterns

SIEM Query:

SELECT * FROM logs WHERE message LIKE '%metaColumns%' OR message LIKE '%metaForeignKeys%' OR message LIKE '%metaIndexes%' AND (message LIKE '%SQLite%' OR message LIKE '%sqlite3%')

🔗 References

📤 Share & Export