[CLSA-2026:1790165214] Fix CVE(s): CVE-2014-3622
Type:
security
Severity:
Important
Release date:
2026-09-23 12:07:08 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:07f1aaa500af7e73d11c9a206aa70468e3d95937
  • alt-php56-bcmath_5.6.40-140_amd64.deb
    sha:6bff6355e7bf291b8c2935023676b58eca5294ee
  • alt-php56-cli_5.6.40-140_amd64.deb
    sha:d93fe2b5b903c95eda11dde6d5f6c38b749ded98
  • alt-php56-common_5.6.40-140_amd64.deb
    sha:de1bea354c2c1e19fdb590a4814c5dc83e9581c5
  • alt-php56-dba_5.6.40-140_amd64.deb
    sha:e5e41edef9ff8b2612dba2cee3b95791fe809e03
  • alt-php56-dbx_5.6.40-140_amd64.deb
    sha:dc02842a72eb2dab181556528e581749ee294a39
  • alt-php56-dev_5.6.40-140_amd64.deb
    sha:47ac6ea2f1a2834e0fcbce4f54a18d9a32288f07
  • alt-php56-enchant_5.6.40-140_amd64.deb
    sha:b203d4d3bcc129cdc4e3d3c4e46c2b8d54ebe571
  • alt-php56-firebird_5.6.40-140_amd64.deb
    sha:b5ab915903c89cfb0e81cc5745c363777e3e6259
  • alt-php56-gd_5.6.40-140_amd64.deb
    sha:914841d539f2c02776ea66d5fdd2233bd4d9271d
  • alt-php56-imap_5.6.40-140_amd64.deb
    sha:ac7225a856a145d3c085abb37518eca69ef9156f
  • alt-php56-intl_5.6.40-140_amd64.deb
    sha:e2a295b9bb27e7f8e982fd022dec1995b6a3659b
  • alt-php56-ldap_5.6.40-140_amd64.deb
    sha:b4cbb72da474aeb8b9ec8595b5cafb00ccd187c3
  • alt-php56-mbstring_5.6.40-140_amd64.deb
    sha:852913b30ef5b116c89c482222a46a7f35c20db7
  • alt-php56-mcrypt_5.6.40-140_amd64.deb
    sha:01114616562805ef3db2d7ca578079e455a1920a
  • alt-php56-mysqlnd_5.6.40-140_amd64.deb
    sha:6c65ad87d77ce4ba42ce287beb18f7e93311db63
  • alt-php56-odbc_5.6.40-140_amd64.deb
    sha:042264945d8a4f932507eae61391bac31f016bda
  • alt-php56-opcache_5.6.40-140_amd64.deb
    sha:d3ccefd3365cb0985ce9775ee3da666ff3fb732e
  • alt-php56-pdo_5.6.40-140_amd64.deb
    sha:6404b51064051b668aece00dd222b2b51fd7211e
  • alt-php56-pgsql_5.6.40-140_amd64.deb
    sha:91c7d7607ef4cde2006f93602ec67e36b2747b50
  • alt-php56-php-fpm_5.6.40-140_amd64.deb
    sha:fa7739c582a1796748e82b05b5d7b49fa7c9ef1c
  • alt-php56-process_5.6.40-140_amd64.deb
    sha:5c758f18e69dab73c6b93ee291d9dbf166d582fe
  • alt-php56-pspell_5.6.40-140_amd64.deb
    sha:80c5485a0e6c32cf742b83592669c782a806df0e
  • alt-php56-recode_5.6.40-140_amd64.deb
    sha:ae18a291e062a38ae887d11e4813f69ac8ac0457
  • alt-php56-snmp_5.6.40-140_amd64.deb
    sha:0fa9430bfe955008752dc67de0850bc1ae6b28e7
  • alt-php56-soap_5.6.40-140_amd64.deb
    sha:e95d8273d43c4793c0d0136b1ca29f1c9f734243
  • alt-php56-sybase_5.6.40-140_amd64.deb
    sha:75ccda20829fc51b711ed96ce1a464e707a26523
  • alt-php56-tidy_5.6.40-140_amd64.deb
    sha:1f573aed77c5de372e9f828840f07c6fb34c1908
  • alt-php56-xml_5.6.40-140_amd64.deb
    sha:bcea0c190da3281a4513b2e7083e6505370a3832
  • alt-php56-xmlrpc_5.6.40-140_amd64.deb
    sha:7bd512812c55b32da72c87a23a474e8794950619
Notes:
This page is generated automatically and has not been checked for errors. For clarification or corrections please contact the CloudLinux Packaging Team.