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
pfsense-cp-filemanager-write — pfSense CE 2.9.0-DEVELOPMENT - High - Remote - File write - CP file manager | Kitploit
Tools/GitHubGitHub/abraxas/pfsense-cp-filemanager-write
Vulnerability ScannersVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingPapers & ResearchLabs & Practice
GitHub
abraxas/pfsense-cp-filemanager-write

pfsense-cp-filemanager-write

pfSense CE 2.9.0-DEVELOPMENT - High - Remote - File write - CP file manager

View Repository
54 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Abraxas Labs - pfsense-cp-filemanager-write

abraxaslabs.tech  ·  github.com/abraxas  ·  @abraxas_null  ·  [email protected]  ·  pfsense-cp-filemanager-write

pfsense-cp-filemanager-write

Class: File write Reach: Remote

pfSense CE 2.9.0-DEVELOPMENT (9363ac5) - pfsense.org

Upload name is not basename(). A name that already contains captiveportal- skips the prefix. file_put_contents("{$g['captiveportal_element_path']}/{$data['name']}") with cpelements = /var/db/cpelements. Remaining ../ after captiveportal-.. still walks to /.

IDno CVE yet
ClassFile write
ReachRemote (authenticated WebGUI unless noted)
CWECWE-22
CVSSHigh: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
ProductpfSense CE
Affected2.9.0-DEVELOPMENT (9363ac5b8651a1c7a333180425ce7719070f95f9)
AuthWebGUI session with page-services-captiveportal-filemanager
LicenseGNU Affero GPL v3.0
Lab127.0.0.1 only

I pinned public master 9363ac5. The lab is a PHP gadget of the pinned sink, loopback HTTP on 127.0.0.1:19000.

Series write-up: https://abraxaslabs.tech/research/pfsense-ce-leftovers

What an attacker can do

MethodSinkPrivilege
POST services_captiveportal_filemanager.php file namefile_put_contents cpelements/{$data['name']}Integrity: Lab-proven: name captiveportal-../../../../../oracle/... skipped the prefix and wrote outside cpelements. Root PHP write is host RCE on this platform.
same leftoversame sinkRecon: Inferred: overwrite config.xml or www PHP.
same leftoversame sinkAvailability: Inferred: overwrite critical files.

Requires: page-services-captiveportal-filemanager. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.

Requires: page-services-captiveportal-filemanager. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root. CSRF-magic on POST unless noted. WebGUI PHP-FPM is root.

Adjacent surface that stays closed

Name without the substring is prefixed and cannot escape that way. Documented PHP inside the portal jail is a different feature.

No Diagnostics: Command unless that page is also granted.

Lab

cd lab
./run.sh

Loopback 127.0.0.1:19000. Compose project pfsense-cp-filemanager-write. Witness PFSENSE-CP-FILEMANAGER-WRITE-WITNESS. Loopback only: 127.0.0.1:19000. Compose project pfsense-cp-filemanager-write. Witness PFSENSE-CP-FILEMANAGER-WRITE-WITNESS. PHP gadget of the pinned lines. Stack tears down after the run.

Last line:

SUCCESS PFSENSE-CP-FILEMANAGER-WRITE control-prefixed=yes prefix-no-escape=yes trigger-outside=yes PFSENSE-CP-FILEMANAGER-WRITE-WITNESS

Fix

basename() the upload name. Always prefix. Reject .. .

References

  • github.com/pfsense/pfsense 9363ac5b8651a1c7a333180425ce7719070f95f9
  • CWE-22
  • Series: https://abraxaslabs.tech/research/pfsense-ce-leftovers
Download Tool