CVE-2026-17543: SQL Injection in PHP PostgreSQL Extension Backslash Escaping
- Vendor
- PHP Group
CVE-2026-17543 is an SQL injection vulnerability in PHP's PostgreSQL extension (ext-pgsql). Improper escaping of backslashes in attacker-controlled parameters can permit a backslash breakout when PostgreSQL standard_conforming_strings is enabled, allowing input intended as data to alter SQL query structure. Affected upstream releases include PHP 8.2.x before 8.2.33, 8.3.x before 8.3.33, 8.4.x before 8.4.24, and 8.5.x before 8.5.9. Vendor-maintained older PHP branches also require applicable backported security updates.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can compromise database confidentiality, integrity, and availability through unauthorized SQL operations. Potential consequences include disclosure, modification, or deletion of data and disruption of database-backed services, subject to the application's database privileges. The vulnerability has a reported CVSS v3.0 score of 9.8, reflecting low-complexity network exploitation without required privileges or user interaction.
Mitigation
If you can’t patch tonight, do this now.
Use parameterized queries that bind attacker-controlled values separately from SQL syntax rather than constructing queries through string concatenation and escaping. Until patched, restrict access to affected application endpoints and apply least-privilege permissions to database accounts to limit exploitation opportunities and consequences. These controls do not replace the PHP security update.
Remediation
Patch, then assume compromise.
Upgrade to PHP 8.2.33, 8.3.33, 8.4.24, or 8.5.9 or a later supported release in the corresponding branch. For distribution-managed installations, install the vendor's fixed PHP packages, including the PostgreSQL extension; older upstream version numbers may contain backported fixes. Relevant updates include RHSA-2026:62334 for RHEL 8 PHP 7.4, RHSA-2026:61259 for RHEL 9 PHP 8.0, and RHSA-2026:62614 for RHEL 10 PHP 8.3. Debian trixie installations should update php8.4 packages to 8.4.24-1~deb13u1 or later.
Exploits
1 exploit validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2026-17543 exploited in the wild?
- As of Oct 25, 2026, Mallory has no reports of CVE-2026-17543 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-17543?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2026-17543, the earliest disclosed Aug 6, 2026.
- Is there a patch for CVE-2026-17543?
- Upgrade to PHP 8.2.33, 8.3.33, 8.4.24, or 8.5.9 or a later supported release in the corresponding branch. For distribution-managed installations, install the vendor's fixed PHP packages, including the PostgreSQL extension; older upstream version numbers may contain backported fixes.
- What products are affected by CVE-2026-17543?
- PHP Group Php.
- How severe is CVE-2026-17543?
- CVE-2026-17543 has a CVSS v4 score of 8.1 (High) and an EPSS score of 0.33% (27th percentile) as of Oct 25, 2026.
Recent activity
49 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.