Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
proftpd-site-copy-dest-follow — ProFTPD 1.3.9d - High - Remote - Privilege leftover / File write - SITE COPY dest follows symlink | Kitploit
Tools/GitHubGitHub/abraxas/proftpd-site-copy-dest-follow
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationSecurity VirtualizationPenetration TestingPapers & ResearchLabs & Practice

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
GitHubabraxas/proftpd-site-copy-dest-follow

proftpd-site-copy-dest-follow

ProFTPD 1.3.9d - High - Remote - Privilege leftover / File write - SITE COPY dest follows symlink

View Repository
97 days agoNot yet reviewed

Abraxas Labs - proftpd-site-copy-dest-follow

abraxaslabs.tech  ·  github.com/abraxas  ·  @abraxas_null  ·  [email protected]  ·  proftpd-site-copy-dest-follow

proftpd-site-copy-dest-follow

Class: Privilege leftover / File write Reach: Remote

ProFTPD 1.3.9d (f59f248) - proftpd.org

Contrib mod_copy SITE COPY Limit-checks dest with dir_canonical_vpath (unresolved). pr_fs_copy_file2 then opens the dest without O_NOFOLLOW, so a dest symlink is followed. FTP STOR Limit-checks a resolved path (dir_realpath / dir_best_path). SITE COPY dest does not.

An authenticated FTP user overwrites a WRITE-denied file by pointing a dest symlink at it and issuing SITE COPY. Direct STOR and SITE COPY to the victim stay 550. STOR / SITE RMDIR / RMD of the link stay 550. DELE removes the link node only. No shell. Unix DAC still applies.

This is the inverse of public Issue 2095 (SITE COPY source READ skip). It is distinct from public Issue 2256 (RNTO EXDEV symlink follow). This leftover is SITE COPY dest on every copy, not only EXDEV.

IDno CVE yet
ClassPrivilege leftover / File write
ReachRemote (authenticated FTP)
CWECWE-59, CWE-863
CVSSHigh: 7.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
ProductProFTPD
Affected1.3.9d tag v1.3.9d (f59f248e26bdfa514443e42bf72a145641df635d) contrib mod_copy
Authauthenticated FTP (mod_copy loaded, CopyEngine default on). SITE SYMLINK plant also needs contrib mod_site_misc unless the link already exists
LicenseGNU Affero GPL v3.0
Lab127.0.0.1 only

What an attacker can do

Who: an authenticated FTP user. mod_copy loaded. A dest symlink in a WRITE-allowed directory (SITE SYMLINK, or a pre-existing link). SITE SYMLINK src uses dir_check_canon G_READ, so planting a link to the victim file needs READ on that file. The split is READ allowed, WRITE denied. The session UID must still be able to Unix-write the target.

MethodSinkPrivilege
SITE SYMLINK (or existing link) in a WRITE-allowed dir whose target is a WRITE-denied file the UID can Unix-write; SITE COPY readable-src that-linkpr_fsio_open dest followsIntegrity (lab-proven): truncate/overwrite the Limit-denied file as the session UID. Lab: /secret/victim went from ORIGINAL to the witness after SITE COPY /readable/src.txt /upload/link. Direct SITE COPY to /secret/victim stayed 550.
SITE RMDIR of that same linkdir_check_canon -> dir_best_pathClosed (lab-proven): 550 RMDIR /upload/link: Operation not permitted. Victim intact.
Core RMD of that same linkdir_best_path + WRITEClosed (lab-proven): 550 Permission denied. Victim intact.
STOR of the dest linkdir_best_path + WRITEClosed (lab-proven): STOR /upload/link -> 550. Victim intact.
DELE of the dest linkunlink the link nodeClosed for the victim (lab-proven): DELE removed the link only; victim still held the witness.
DefaultRoot jail to host /etcchrootClosed. Unix DAC still applies. No unauth. No shell.

Lab-proven vs inferred: overwrite via unresolved dest symlink, denied STOR/RMDIR/RMD, and DELE-of-link-only are lab-proven. Unauth and Unix DAC remain inferred from the auth/chroot model.

How I found it

I pinned proftpd/proftpd v1.3.9d (f59f248). Default core FTP with sample basic.conf had no unpublished Crit/High. Contrib mod_copy was next.

copy_copy (contrib/mod_copy.c) builds dest with dir_canonical_vpath then dir_check(..., G_WRITE, to) on that unresolved string. pr_fs_copy_file2 (src/fsio.c) comments that stat/open follow the dest symlink, then pr_fsio_open(dst, O_WRONLY|O_CREAT|O_NONBLOCK) with no O_NOFOLLOW.

Public Issue 2095 is source READ skip on SITE COPY. Skip that exact bug. Public Issue 2256 is RNTO EXDEV follow. This leftover is SITE COPY dest on every copy.

SITE RMDIR recursive follow was a parent drop: SITE RMDIR uses dir_check_canon / dir_best_path, which resolves the symlink before Limit. Lab confirmed SITE RMDIR and core RMD of the dest link stay denied.

Wrong turns already recorded: treating dest Limit as resolved because STOR is; treating Issue 2256 as this leftover; claiming SITE RMDIR walks the victim. Theatre: a reverse shell. The oracle is /secret/victim holding the witness after SITE COPY through /upload/link, with STOR of the link still 550.

Lab

python3 proftpd-site-copy-dest-follow-Abraxas-Labs.py

or:

cd lab
./run.sh

Loopback FTP 127.0.0.1:18720, passive 18721-18730. Compose project proftpd-site-copy-dest-follow. Witness PROFTPD-SITE-COPY-DEST-FOLLOW-WITNESS. Last line:

SUCCESS PROFTPD-SITE-COPY-DEST-FOLLOW victim-has-witness=yes stor-secret=denied stor-link=denied site-rmdir-walk=no rmd-walk=no dele-victim=intact PROFTPD-SITE-COPY-DEST-FOLLOW-WITNESS

The fix

Limit-check the resolved dest (dir_realpath / dir_best_path), or open dest with O_NOFOLLOW. STOR already Limit-checks a resolved path.

Vendor intake is [email protected]. Do not open a public GitHub issue on proftpd/proftpd.

References

  • github.com/proftpd/proftpd tag v1.3.9d (f59f248e26bdfa514443e42bf72a145641df635d)
  • contrib/mod_copy.c copy_copy
  • src/fsio.c pr_fs_copy_file2
  • Inverse: Issue 2095 SITE COPY source <Limit READ>
  • Distinct: Issue 2256 RNTO EXDEV symlink follow
  • CWE-59 · CWE-863

License

GNU Affero GPL v3.0. See LICENSE. Loopback lab only. No warranty.

Download Tool