[CLSA-2026:1790162075] Fix CVE(s): CVE-2014-3622
Type:
security
Severity:
Important
Release date:
2026-09-23 11:14:47 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:bb040024ebdc1527d47e9c7182d4293cfc30dd07
  • alt-php56-bcmath_5.6.40-140_amd64.deb
    sha:8e88acdf54fd279738b652ea5cb7fc5563b2f4b3
  • alt-php56-cli_5.6.40-140_amd64.deb
    sha:949c7809c0461dcce719f04d3bc521f9bbe65ebd
  • alt-php56-common_5.6.40-140_amd64.deb
    sha:35843ebbf9360691953c4a859f81b928ff5d4831
  • alt-php56-dba_5.6.40-140_amd64.deb
    sha:24844d951f66216e69b62d7b27d2d1192370a679
  • alt-php56-dbx_5.6.40-140_amd64.deb
    sha:61affe40f65bc6b7b5ad9ce3e726aeae51a10a89
  • alt-php56-dev_5.6.40-140_amd64.deb
    sha:40bf09a723b08eee241d6ed7e43377b80dd5eaea
  • alt-php56-enchant_5.6.40-140_amd64.deb
    sha:d6df6948e5d4aa3d34f16ee5589227485cb6da66
  • alt-php56-firebird_5.6.40-140_amd64.deb
    sha:eb8e83da8131bf1c4689854797513c830028559e
  • alt-php56-gd_5.6.40-140_amd64.deb
    sha:85e2a7622342e505dcdd92ac779000c60c9dc815
  • alt-php56-imap_5.6.40-140_amd64.deb
    sha:29b31405398a191ed2abacec8afd97bcb53657a6
  • alt-php56-intl_5.6.40-140_amd64.deb
    sha:fbc85c1272ce13b6f344da53d22b76f0039f4b7b
  • alt-php56-ldap_5.6.40-140_amd64.deb
    sha:f1c25ccd3646f69de9f3681bf41c78249111ea6b
  • alt-php56-mbstring_5.6.40-140_amd64.deb
    sha:b08ca7f9fb92df2578aebe4400848aca811dc1e8
  • alt-php56-mcrypt_5.6.40-140_amd64.deb
    sha:3938618aabff3b91101cd80c13d9ce0ff1d89faf
  • alt-php56-mysqlnd_5.6.40-140_amd64.deb
    sha:ac2361e525ef30387ba281bf170bec931437e4ae
  • alt-php56-odbc_5.6.40-140_amd64.deb
    sha:cdfdb21e2bf5e75f9db2af951d16e45c145c9146
  • alt-php56-opcache_5.6.40-140_amd64.deb
    sha:90fc71bd460a085ebc6b3ddb8990ade3722e8cb7
  • alt-php56-pdo_5.6.40-140_amd64.deb
    sha:6ee5b0b2d80849a7a6febc0389f4b7184bc972c2
  • alt-php56-pgsql_5.6.40-140_amd64.deb
    sha:1a58fa6b1457e947e39e675d6f82decfc4970967
  • alt-php56-php-fpm_5.6.40-140_amd64.deb
    sha:cb4ec2cc368de3a2742074bc8842001608eceddf
  • alt-php56-process_5.6.40-140_amd64.deb
    sha:81915e130b02f6c9e1eef38beae89cf42a14d735
  • alt-php56-pspell_5.6.40-140_amd64.deb
    sha:20572f4e3bd7142cd505a1f805163ca1ad12611c
  • alt-php56-recode_5.6.40-140_amd64.deb
    sha:66133f39adfcedb989a9c1f6c90d7afa8682da3f
  • alt-php56-snmp_5.6.40-140_amd64.deb
    sha:d2a57587df5e988b5648ef8d2cbb4bb283872680
  • alt-php56-soap_5.6.40-140_amd64.deb
    sha:5a2f7d305cddcc6fda78074198ef7f926d3595b6
  • alt-php56-sybase_5.6.40-140_amd64.deb
    sha:172783e037bf66156989c18f0c77fe338f107fc9
  • alt-php56-tidy_5.6.40-140_amd64.deb
    sha:6b21bd955660576888fc88eede7b4acda33f7a0a
  • alt-php56-xml_5.6.40-140_amd64.deb
    sha:a1b0b3b9198c5382784539f514ae08517f0ba53d
  • alt-php56-xmlrpc_5.6.40-140_amd64.deb
    sha:2d7889b35d5cedc2c93def61002dd1b7de514272
Notes:
This page is generated automatically and has not been checked for errors. For clarification or corrections please contact the CloudLinux Packaging Team.