[CLSA-2026:1790161647] Fix CVE(s): CVE-2014-3622
Type:
security
Severity:
Important
Release date:
2026-09-23 13:49:24 UTC
Description:
* SECURITY UPDATE: ext/pgsql and ext/pdo_pgsql ignored the error status of the libpq escaping helpers - debian/patches/php-5.6-CVE-2025-1735.patch: backport upstream commit 9376aeef9f8ff81f2705b8016237ec3e30bdee44 (GHSA-hrwm-9436-5mv3) in ext/pgsql/pgsql.c and ext/pdo_pgsql/pgsql_driver.c. Every PQescapeStringConn() call passed NULL for the "error" out-parameter and the pointers returned by PQescapeByteaConn() and PQescapeIdentifier() were used without a NULL check. libpq refuses to escape input that is not valid in the connection's client encoding - the PostgreSQL CVE-2025-1094 case - setting its error flag and leaving a mangled buffer behind, which PHP then used to build a query, so the caller had no way to learn the value was never escaped. The unchecked PQescapeIdentifier() returns are a NULL dereference: strlen(NULL) via smart_str_appends() in build_tablename(), memcpy() from NULL in the PDO quoter. Call sites covered: pg_escape_string(), pg_escape_bytea(), php_pgsql_meta_data(), php_pgsql_convert() (string, bytea and identifier paths), build_tablename(), php_pgsql_insert(), build_assignment_string() and pgsql_handle_quoter(). Confirmed on PostgreSQL 15.19 with a locally built 5.6.40: for the input "\xC3' OR 1=1 --" an unpatched pg_escape_string() returned "\xC0 '' OR 1=1 --" with no error of any kind, and pg_convert(), pg_insert() and PDO::quote() emitted that same mangled value into the generated SQL; with this patch all four report the failure and return false, while valid input is byte-identical to before. - Note: hand-ported to the PHP 5 zval API from the alt-php70 adaptation (Gerrit 269508) - 13 of the upstream commit's 22 hunks target the zend_string / zend_result / ZPP-exception APIs PHP 5 does not have. build_tablename() gains TSRMLS_DC and an int (SUCCESS/FAILURE) return, php_pgsql_convert() escapes into a local buffer and only populates the result zval once the escape succeeded so the existing error cleanup stays safe, php_pgsql_insert() fetches the current hash key so the diagnostic can name the field, and every error flag is initialised to 0 so the added checks cannot read uninitialised memory in the !HAVE_PQESCAPE_CONN build where PQescapeStringConn() is a macro that discards the error argument. - Adds ext/pgsql/tests/ghsa-hrwm-9436-5mv3.phpt, a PHP 5.6 replacement for the two upstream .phpt files, which rely on PHP 8 exception semantics. Like every other test in ext/pgsql/tests it skips unless PGSQL_TEST_CONNSTR points at a live server. ext/pgsql plus ext/pdo_pgsql: 140 passed and the same 3 pre-existing failures (bug48764, bug_33876, bug81720) before and after the patch. - CVE-2025-1735
CVEs fixed:
Updated packages:
  • alt-php56_5.6.40-140_amd64.deb
    sha:371fa7576dc3e583e18103e9b399448d15ed7a71
  • alt-php56-bcmath_5.6.40-140_amd64.deb
    sha:281f824fe76ec51b66d10e0aec9bcf37996b164f
  • alt-php56-cli_5.6.40-140_amd64.deb
    sha:53fd4f06cb22e67067d92e95048751c5975993d0
  • alt-php56-common_5.6.40-140_amd64.deb
    sha:291de6e8abaae2278b01815a37fe78875d1260c4
  • alt-php56-dba_5.6.40-140_amd64.deb
    sha:f0a20b4a3e8f90974f56e5e0b3e1f81f2c781a92
  • alt-php56-dbx_5.6.40-140_amd64.deb
    sha:6d0f3143c5b33d1619b398dca33c1a1cd916d6f4
  • alt-php56-dev_5.6.40-140_amd64.deb
    sha:5ad1d7229a708adabbcf964a21cbfdbf4e3326df
  • alt-php56-enchant_5.6.40-140_amd64.deb
    sha:8c1a18bf455a54b72698b8fd113c9bebe6c6ecf0
  • alt-php56-firebird_5.6.40-140_amd64.deb
    sha:8d510964ac870d46401447d7957d1d3080e09851
  • alt-php56-gd_5.6.40-140_amd64.deb
    sha:82d8ad83e047d0cfb1c9e55ed299066442f7f576
  • alt-php56-imap_5.6.40-140_amd64.deb
    sha:8d0d2e659da926ed58d352683263f33c9051a96b
  • alt-php56-intl_5.6.40-140_amd64.deb
    sha:114067a6e48ce55a5f8d254f050bef68a82d99ba
  • alt-php56-ldap_5.6.40-140_amd64.deb
    sha:deab8eb54e1c973c656888c2dba4bfe52325a20d
  • alt-php56-mbstring_5.6.40-140_amd64.deb
    sha:55bf545cd6d02b5bc86608451458c9e8170efd6b
  • alt-php56-mcrypt_5.6.40-140_amd64.deb
    sha:78cbe73522702cee1b1e10103169086586928a1c
  • alt-php56-mysqlnd_5.6.40-140_amd64.deb
    sha:529bee72e0ffee1c618b7b459e0b4635cb19d6fc
  • alt-php56-odbc_5.6.40-140_amd64.deb
    sha:3edb262028c5b67de3c7fd355884912d1f98358c
  • alt-php56-opcache_5.6.40-140_amd64.deb
    sha:748bab457094ca19888efeaedd4b9964e54b33fd
  • alt-php56-pdo_5.6.40-140_amd64.deb
    sha:2951094f11e966a7c7275ae8d6046ca97f54b033
  • alt-php56-pgsql_5.6.40-140_amd64.deb
    sha:ba8da244aaa6dfc5c8b33ef3e0b887db8c912478
  • alt-php56-php-fpm_5.6.40-140_amd64.deb
    sha:f541ba40e43fdb913813da20cbb0a4b965bf7b5d
  • alt-php56-process_5.6.40-140_amd64.deb
    sha:5983e4a106cc10767ba994d09853603467581436
  • alt-php56-pspell_5.6.40-140_amd64.deb
    sha:43fdc63594fe3b3190269728820ddb379513ce59
  • alt-php56-recode_5.6.40-140_amd64.deb
    sha:c92b9b26e6e263c09239a9f451a7f3f08af698fd
  • alt-php56-snmp_5.6.40-140_amd64.deb
    sha:37c3e2525d03006d86605b39a233606f30476565
  • alt-php56-soap_5.6.40-140_amd64.deb
    sha:a1a30e1a8bd5e265835ec300a52947e16ac1585a
  • alt-php56-sybase_5.6.40-140_amd64.deb
    sha:7be5abcf37e50d6448add99c873145ec8893c280
  • alt-php56-tidy_5.6.40-140_amd64.deb
    sha:7940dec625db8abb9cb7652dca06287cad156165
  • alt-php56-xml_5.6.40-140_amd64.deb
    sha:9781f6bf73f3f2ab3e291817baca9d1e778b536e
  • alt-php56-xmlrpc_5.6.40-140_amd64.deb
    sha:ad9c8084f894bd425e2b111da5aa028f2ab51600
Notes:
This page is generated automatically and has not been checked for errors. For clarification or corrections please contact the CloudLinux Packaging Team.