Laravel Magazine
PHP Ships Security Patches for a Postgres SQL Injection Flaw

PHP Ships Security Patches for a Postgres SQL Injection Flaw

Eric Van Johnson ·

The PHP team released 8.2.33, 8.3.33, 8.4.24, and 8.5.9, a coordinated set of point releases across four supported branches carrying three security fixes and the usual round of bug fixes. If your Laravel application connects to PostgreSQL, this one deserves an actual look rather than a "we'll get to it next sprint" shrug.

The headline fix: CVE-2026-17543

The most serious issue is a high-severity SQL injection vulnerability in PHP's native pgsql extension, affecting the pg_insert(), pg_update(), pg_select(), and pg_delete() functions. These are lower-level functions than what most Laravel applications touch directly — Eloquent and the query builder go through PDO rather than calling pgsql functions themselves — but plenty of packages, legacy code, and raw database utilities call into these functions directly for bulk operations or admin tooling. If any part of your PHP Architect codebase (or a dependency in composer.lock) calls pg_insert, pg_update, pg_select, or pg_delete directly, treat this as a stop-what-you're-doing patch.

Two more fixes bundled in

Alongside the SQL injection fix, this release addresses:

  • CVE-2026-17544 — an out-of-bounds write in BCMath's bccomp() function, affecting PHP 8.4 and 8.5. If your application does arbitrary-precision math with bcmath (billing, financial calculations, or crypto-adjacent code often does), update.
  • CVE-2026-7260 — a crash triggered by recursive symlinks processed through the Phar extension. Less severe on its own, but a denial-of-service vector if your app extracts or reads untrusted .phar archives.

What to actually do about it

For most Laravel shops, the fix is unglamorous but important:

  1. Check your current PHP version with php -v on every environment — local, staging, and production. Don't assume they match.
  2. If you're on 8.2, 8.3, 8.4, or 8.5, upgrade to the patched point release for your branch (8.2.33 / 8.3.33 / 8.4.24 / 8.5.9 respectively).
  3. Grep your codebase and vendor directory for direct pg_insert(, pg_update(, pg_select(, and pg_delete( calls — most Laravel apps will come up empty, since Eloquent uses PDO, but it's worth the thirty seconds to confirm.
  4. If you're running Laravel Forge, Laravel Cloud, or a managed platform, check their status page or dashboard — most managed PHP hosts roll security point releases out within a day or two of upstream, sometimes automatically.

None of this requires a code change on a typical Eloquent-based application. It does require actually shipping the point release rather than letting php.ini quietly drift a few minor versions behind, which is how most "known vulnerability, patch available for months" incidents happen in the first place.

Stay Updated

Subscribe to our newsletter

Get latest news, tutorials, community articles and podcast episodes delivered to your inbox.

Weekly articles
We send a new issue of the newsletter every week on Friday.
No spam
We'll never share your email address and you can opt out at any time.