CVE-2009-0542
NoneCVSS
—
EPSS
73.8%
Published
Feb 12, 2009
CISA due date
—
Cloudanix analysis
A flaw in an older FTP server lets attackers send a specially crafted login name that can steal or change information in a connected database.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Network Service
- Class
- SQL Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Remote unauthenticated attacker can inject arbitrary SQL commands into backend database queries by supplying a percent character in the FTP username, which mod_sql expands into a single quote during variable substitution.
Why it matters to the business
Attackers can read, modify, or delete data in the SQL backend used by the FTP server; in high-prevalence environments this can lead to credential theft, lateral movement, or full compromise of any system relying on the affected Chainguard flux-0 package.
How an attack unfolds
An attacker connects to a vulnerable ProFTPD instance, sends a username containing a percent character that is expanded by mod_sql into a single quote, and appends malicious SQL that executes arbitrary commands against the backend database; Flax Typhoon has been observed leveraging similar injection flaws for initial access.
How to fix it
Upgrade flux-0 (Chainguard) to the fixed version 0; disable mod_sql or restrict database privileges for the FTP service account if immediate upgrade is not possible.
How to confirm the fix worked
Confirm the installed flux-0 package version is 0 or later; test that a username containing '%' no longer results in SQL syntax errors or unexpected query behavior.
Typical attack path
- Attacker scans for exposed ProFTPD servers running versions 1.3.1-1.3.2rc2
- Sends crafted username containing '%' to trigger quote injection via mod_sql
- Injects SQL payload to extract or modify backend data or escalate privileges
- Uses obtained credentials or database access for further compromise
How to detect it
Search FTP authentication logs and mod_sql query logs for usernames containing the percent character followed by SQL metacharacters; review database audit logs for unexpected queries originating from the FTP service account.
- %' OR
- %' UNION
- mod_sql.*username.*%
What your security team should do
- Immediately upgrade all instances of flux-0 (Chainguard) to version 0
- Audit FTP logs for usernames containing percent characters from the last 90 days
- Review and minimize SQL privileges granted to the ProFTPD service account
- Monitor EPSS trend and threat actor activity for renewed exploitation spikes
The record
SQL injection vulnerability in ProFTPD Server 1.3.1 through 1.3.2rc2 allows remote attackers to execute arbitrary SQL commands via a "%" (percent) character in the username, which introduces a "'" (single quote) character during variable substitution by mod_sql.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | proftpd-dfsg | 0 | 1.3.2-1 |
| Debian:11 | proftpd-dfsg | 0 | 1.3.2-1 |
| Debian:12 | proftpd-dfsg | 0 | 1.3.2-1 |
| Debian:13 | proftpd-dfsg | 0 | 1.3.2-1 |
| Debian:5.0 | proftpd-dfsg | 0 | 1.3.1-17lenny1 |
| Debian:5.0 | proftpd-dfsg | 0 | 1.3.1-17lenny2 |
| openSUSE:Tumbleweed | proftpd | 0 | 1.3.5b-2.5 |
Related vulnerabilities
- CVE-2011-4130 Use-after-free vulnerability in the Response API in ProFTPD before 1.3.3g allows remote… Also affects proftpd-dfsg
- CVE-2009-0543 ProFTPD Server 1.3.1, with NLS support enabled, allows remote attackers to bypass SQL… Also affects proftpd-dfsg
- CVE-2007-2165 The Auth API in ProFTPD before 20070417, when multiple simultaneous authentication… Also affects proftpd-dfsg
- CVE-2006-6170 Buffer overflow in the tls_x509_name_oneline function in the mod_tls module, as used in… Also affects proftpd-dfsg
- CVE-2006-6171 ProFTPD 1.3.0a and earlier does not properly set the buffer size limit when… Also affects proftpd-dfsg
- CVE-2006-5815 Stack-based buffer overflow in the sreplace function in ProFTPD 1.3.0 and earlier allows… Also affects proftpd-dfsg
- CVE-2005-4816 Buffer overflow in mod_radius in ProFTPD before 1.3.0rc2 allows remote attackers to cause… Also affects proftpd-dfsg
- CVE-2024-48651 In ProFTPD through 1.3.8b before cec01cc, supplemental group inheritance grants… Also affects proftpd-dfsg