Skip to content

Build1 publisher2 min readPublished

A published ProFTPD mod_sql exploit needs a login and a privileged PostgreSQL role

Exploit-DB's entry for CVE-2026-42167 carries a CVSS of 8.1, and the proof of concept it publishes only fires after authentication, against a PostgreSQL backend whose database role can already run code. Triage starts in the ProFTPD config.

The Engineer · Build desk

Illustration accompanying A published ProFTPD mod_sql exploit needs a login and a privileged PostgreSQL role

What happened

  • Exploit-DB published EDB-ID 52658 on August 25, 2026, a working proof of concept for CVE-2026-42167 in the mod_sql extension of ProFTPD, a vulnerability scored 8.1 under CVSS v3.1.
  • Advisory information cited in the write-up says exploitation depends on how mod_sql is configured, with outcomes including authentication bypass, privilege escalation and remote code execution.
  • ProFTPD 1.3.9a is the fixed version named in the advisory. The flaw sits in the mod_sql extension, not the core FTP service.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint A version scan cannot answer whether attacker input reaches the affected query, because the query is written locally by the administrator, so the work falls on whoever can read the config and the database grants.
  • exposure The set of servers the published script can actually hit is those where an attacker already holds credentials and the PostgreSQL role can execute code; other affected installs need a different exploit written for them.
  • decision Whether this earns an out-of-hours change window turns on two configuration answers: is SQL logging switched on, and can the database account run code.
  • cost Applicability costs nine questions per host in analyst time, and most of those answers live in local configuration files that no vulnerability feed carries.

mod_sql covers two jobs: SQL-backed authentication and SQL logging [9]. Logging is the part that makes this reachable, because the SQL statements are defined by the site administrator and those statements can incorporate FTP-related input [10]. The injected query on your server is text somebody at your site wrote. Two hosts running the same build can be exposed differently, so the question is whether attacker-controlled input gets into the affected query [7].

The published script is narrower than the vulnerability class name. It demonstrates a path that starts after authentication [5] and expects a PostgreSQL backend with database privileges strong enough to reach code execution [6]. Count the conditions and there are at least four: valid credentials, mod_sql in use, a logged field the attacker can influence, and a database role that can run code [17]. A site on MySQL with a restricted role fails two of them, and the script will not work there even if the injection is present. "The answers determine whether the PoC is actually applicable," the author of the write-up wrote [20].

Exploit-DB files the entry as a remote exploit against mod_sql functionality [4], and the demonstrated chain needs a login first [5].

"Don't confuse the existence of a public exploit with proof that every installation is vulnerable," the author wrote [13]. The same post says a CVE labelled RCE does not mean every installation is remotely exploitable with no prerequisites [16], and it recommends reading the exploit source before executing it, to extract the backend, privilege and input assumptions the chain rests on [18].

In my view, four simultaneous conditions makes for a low hit rate across a fleet and a certainty on the hosts that match.

Everything above comes from a single write-up published on dev.to: the score, the Exploit-DB metadata, the fixed version and the summary of the advisory [2][3][8][7]. The post does not reproduce the vendor advisory or the CVSS vector string.

What to watch

  • A CISA KEV entry for CVE-2026-42167: the write-up lists KEV as a source to check but does not report the CVE on it.
  • A second proof of concept against MySQL, or against the SQL-backed authentication path, would widen the reachable population beyond post-authentication PostgreSQL.
  • Publication of the CVSS vector string would show whether the 8.1 already priced in the authentication requirement.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories