Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-17543: SQL Injection in PHP PostgreSQL Extension Backslash Escaping

Published Jul 30, 2026 · Updated 24 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days3 mentions · peak 3 in a dayToday
CVSS8.1High · v4
EPSS0.33%27th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
PHP Group
IdentifiersCVE-2026-17543CWE-89 · Improper Neutralization of Special…

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

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.

Public exploits

Exploits

1 exploit validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.

View more in app →
e-is-for-exploit-cve-2026-17543-php-pgsql-sql-injection-backslash-breakoutThis repository is a compact proof-of-concept for CVE-2026-17543, a critical SQL injection flaw in PHP's procedural PostgreSQL extension (ext/pgsql). The exploit is implemented in a single executable PHP script, poc.php, with Docker artifacts provided to reproduce the issue in an isolated environment. Repository structure: - poc.php: Main exploit/demo script. Connects to PostgreSQL using PGCONN or a localhost fallback, creates a users table, inserts seed rows, and demonstrates two exploit paths. - Dockerfile: Builds a vulnerable PHP CLI container (php:8.4.23-cli), installs libpq/pgsql support, copies poc.php, and runs it. - docker-compose.yml: Starts PostgreSQL 16 and the vulnerable PHP container, wiring PGCONN to the db service. - README.md: Documents the vulnerability, affected versions, payloads, expected output, and usage. Exploit capabilities: 1. Data exfiltration via pg_select(): The script uses payload zzz\' OR 1=1 -- to exploit vulnerable quoting behavior. On affected PHP versions, generated SQL uses E'...' and the backslash escapes a quote, allowing OR 1=1 to execute and return all rows. 2. Privilege escalation via pg_insert(): The payload eve\', true) -- is injected into the name field while admin is nominally set to false. On vulnerable builds, the injected SQL alters the VALUES clause so admin becomes true. 3. SQL visibility for verification: The script calls pg_select() and pg_insert() with PGSQL_DML_STRING to print the generated SQL, making the vulnerable E'...' quoting behavior directly observable. 4. Live execution against a database: After printing the generated SQL, it executes the insert and queries the resulting row to confirm whether admin was forced to true. The exploit is operational rather than merely descriptive: it performs real database operations and demonstrates successful exploitation when run on a vulnerable PHP build. It is not a framework module and not just a detector, although it also implicitly distinguishes patched from vulnerable behavior by comparing query results and generated SQL.Hunt-Benito · Disclosed Aug 6, 2026 · php · dockerfile · web · networkOperational
Exposure surface

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.

VendorProductType
PHP GroupPhpapplication
FAQ

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.
Activity feed

Recent activity

49 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+15 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity17Community discussion across Reddit, Mastodon, and other social sources.