Security advisory Cybersecurity

PHP security releases of July 2025: 8.4.10, 8.3.23, 8.2.29 and 8.1.33

The 3 July 2025 PHP releases fixed three CVEs in pgsql escaping, SOAP and hostname handling. What they mean and how to confirm you are patched.

Published
Reading time
4 min read

Security advisory Vulnerability

Severity: Medium Status: Patched
Status
Fixed upstream in PHP 8.4.10, 8.3.23, 8.2.29 and 8.1.33. Distribution packages carry the fixes under their own version numbers.
Affected
  • PHP 8.4 before 8.4.10
  • PHP 8.3 before 8.3.23
  • PHP 8.2 before 8.2.29
  • PHP 8.1 before 8.1.33
Published
Updated

What you should do

  • Confirm the PHP version for every site and worker, and update to the newest release of a supported branch.
  • If you use pg_escape_string(), pg_escape_literal() or PDO::quote() with PostgreSQL, prefer parameterised queries (pg_query_params() or PDO prepared statements) so escaping errors cannot turn into injection.
  • Do not accept hostnames from users without strict validation, and reject any value containing a null byte.
  • Leave SOAP disabled where you do not need it.
  • Read our php2shell article for the October 2026 fixes, which matter more today.
Timeline
  1. The PHP project released PHP 8.4.10, 8.3.23, 8.2.29 and 8.1.33.
  2. Skyline published this summary.

On 3 July 2025 the PHP project published PHP 8.4.10, 8.3.23, 8.2.29 and 8.1.33 as security releases. The round is small, three CVEs, but one of them touches how the PostgreSQL extensions escape strings, which matters to any application that builds SQL with those functions. Version 8.4.9 was skipped because, as the 8.4.10 announcement explains, it was tagged without the security patches.

At a glance

ItemDetails
ProductPHP (php-src), branches 8.1 to 8.4
Fixed versions8.4.10, 8.3.23, 8.2.29, 8.1.33 (3 July 2025)
CVEsCVE-2025-1735, CVE-2025-6491, CVE-2025-1220
SeverityMedium (highest PHP advisory rating in this round)
Debian 12DSA-5967-1, php8.2 8.2.29-1~deb12u1 (28 July 2025)

What the vulnerabilities are

CVE-2025-1735: pgsql escaping errors were ignored

The pgsql and pdo_pgsql escaping functions did not check whether the underlying libpq quoting call reported an error. PHP's advisory (GHSA-hrwm-9436-5mv3, Medium) says the missing check could result in SQL injection, and the missing error handling could lead to crashes through null pointer dereferences when the PostgreSQL server rejects a string as invalid. The advisory links the issue to PostgreSQL's own CVE-2025-1094 work. The CVE record scores it CVSS 3.1 5.9.

CVE-2025-6491: SOAP crash with a huge namespace prefix

Creating a SoapVar with a fully qualified name larger than 2 GB leaves a libxml2 node in an invalid state, and serialising it causes a null pointer dereference and a crash. The advisory (GHSA-453j-q27h-5p8x, Medium, CVSS 3.1 5.9) notes this applies with libxml2 versions older than 2.13. The impact is denial of service.

CVE-2025-1220: null bytes in hostnames

Functions such as fsockopen() did not reject hostnames that contain a null byte. Other functions, like parse_url(), may read such a hostname differently, so an application that validates a host with one function and connects with another could be steered to a different server. PHP rates this Low (GHSA-3cr5-j632-f35r, CVSS 3.1 3.7) and describes the risk as server-side request forgery.

None of the three CVEs appears in CISA's Known Exploited Vulnerabilities catalog (30 October 2026 edition).

Are you affected?

Upstream builds older than 8.4.10, 8.3.23, 8.2.29 or 8.1.33 are affected. Check every runtime you use:

php -v
php -m | grep -Ei 'pgsql|soap'   # are the affected extensions loaded?
php-fpm8.2 -v                    # Debian/Ubuntu naming; adjust the branch

For distribution packages, compare against the distribution's advisory rather than the upstream number. Debian 12 (bookworm) received the fixes in DSA-5967-1, php8.2 8.2.29-1~deb12u1:

dpkg -l 'php8.2*'
apt policy php8.2-pgsql php8.2-soap php8.2-common

Ubuntu users can look up their release on Ubuntu Security Notices.

How to update

  • Debian and Ubuntu packages: sudo apt update, then sudo apt upgrade. This brings you to the newest security build for your release, which includes these fixes.
  • Other repositories or hosting panels: update through the same channel you installed PHP from.
  • Source and Windows builds: download the current release of your branch from php.net/downloads.
  • Containers: rebuild on a fixed base image and redeploy.

Do not stop at the July 2025 versions. As of 31 October 2026 the current releases are 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP 8.1 stopped receiving upstream fixes after 8.1.34 (end of life 31 December 2025).

Restart or reboot?

No reboot is required, but PHP-FPM and Apache with mod_php keep the old code in memory until restarted:

sudo systemctl restart php8.2-fpm
sudo systemctl restart apache2   # if you use libapache2-mod-php8.2

Restart long-running PHP workers (queues, schedulers, WebSocket servers) as well.

Sources

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Cybersecurity for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.