NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
CRITICAL severity

CVE-2021-3850 — adodb-php

CRITICALFix: adodb/adodb@952de6c

CVE-2021-3850 is a critical-severity (CVSS 9.1) CWE-305 vulnerability in adodb/adodb-php. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for adodb/adodb-php — see the affected versions and patch details below.

Authentication Bypass in ADOdb/ADOdb

Also known asGHSA-65mj-7c86-79jf
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
1 known
Exploitation data as of Nov 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs82th percentile — riskier than 82% of all scored CVEsHighest risk
0.00%0.91%1.83%2.74%0.3%2.2%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

2 pkgs affected
🐘adodb/adodb-php🐘adodb/adodb-php

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Impact

An attacker can inject values into a PostgreSQL connection string by providing a parameter surrounded by single quotes.

Depending on how the library is used in the client software, this may allow an attacker to bypass the login process, gain access to the server's IP address, etc.

Patches

The vulnerability is fixed in ADOdb versions 5.20.21 (952de6c4273d9b1e91c2b838044f8c2111150c29) and 5.21.4 or later (b4d5ce70034c5aac3a1d51d317d93c037a0938d2).

The simplest patch is to delete line 29 in drivers/adodb-postgres64.inc.php:

diff --git a/drivers/adodb-postgres64.inc.php b/drivers/adodb-postgres64.inc.php
index d04b7f67..729d7141 100644
--- a/drivers/adodb-postgres64.inc.php
+++ b/drivers/adodb-postgres64.inc.php
@@ -26,7 +26,6 @@ function adodb_addslashes($s)
 {
    $len = strlen($s);
    if ($len == 0) return "''";
-   if (strncmp($s,"'",1) === 0 && substr($s,$len-1) == "'") return $s; // already quoted
 
    return "'".addslashes($s)."'";
 }

Workarounds

Ensure the parameters passed to ADOConnection::connect() or related functions (nConnect(), pConnect()) are not surrounded by single quotes.

Credits

Thanks to Emmet Leahy (@meme-lord) of Sorcery Ltd for reporting this vulnerability, and to the huntr team for their support.

References

For more information

If you have any questions or comments about this advisory:

  • Add a note in issue #793
  • Contact the maintainers on Gitter

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistadodb/adodb-phpall versions5.20.21composer require adodb/adodb-php:^5.20.21
🐘Packagistadodb/adodb-php≥ 5.21.0&&< 5.21.45.21.4composer require adodb/adodb-php:^5.21.4

Affected Products

2 products · 2 configurations
Application
adodbadodb_project
≤ 5.20.21
range
OS
debian linuxdebian
1 version
9.0
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for adodb/adodb-php, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update adodb/adodb-php to 5.20.21 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-3850 is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

Frequently Asked Questions

### Impact An attacker can inject values into a PostgreSQL connection string by providing a parameter surrounded by single quotes. Depending on how the library is used in the client software, this may allow an attacker to bypass the login process, gain access to the server's IP address, etc. ### Patches The vulnerability is fixed in ADOdb versions 5.20.21 (952de6c4273d9b1e91c2b838044f8c2111150c29) and 5.21.4 or later (b4d5ce70034c5aac3a1d51d317d93c037a0938d2). The simplest patch is to delete line 29 in `drivers/adodb-postgres64.inc.php`: ```php diff --git a/drivers/adodb-postgres64.inc.p
O3 Security · Impact-Aware SCA

Is CVE-2021-3850 in your dependencies?

Find it across Packagist, including transitive dependencies.

CVE-2021-3850: adodb-php — Fixed in 5.20.21