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
Tools/GitHubGitHub/abraxas/webmin-mysql-csv-write
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLabs & Practice
GitHubabraxas/webmin-mysql-csv-write

webmin-mysql-csv-write

Webmin 2.670 - High 8.8 - Remote - Path write - MySQL csv.cgi writes CSV outside bpath

View Repository
7 days agoNot yet reviewed
Share

Abraxas Labs - webmin-mysql-csv-write

webmin-mysql-csv-write

A coworker with a Webmin MySQL login is supposed to dump files into one folder. The Backup Database button honors that jail. The CSV export form does not. They can overwrite a path the backup ACL already refused. When the backup Unix user is root, that write is as the Webmin process, usually root. They still need that login. They still cannot run mysqldump outside the jail.

Class: Path write Reach: Remote (MySQL module user, buser set, bpath jail)

Webmin 2.670 (3a2b2b86) - Webmin

IDno CVE yet
ClassPath write
ReachRemote (signed-in MySQL-module user with buser set and a bpath that does not contain the target)
CWECWE-22
CVSSHigh: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
ProductWebmin
Affected2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
AuthWebmin session. MySQL module. buser must be set. edonly must be off.
LicenseGNU Affero GPL v3.0
Lab127.0.0.1:18420 only

What an attacker can do

Needs a signed-in Webmin user who was given the MySQL module, a backup Unix user (buser), and a backup directory (bpath) that is not /. Default ACL is bpath=/ and buser=root. That is the full grant, not this leftover. The leftover is the jailed user. CSV export is supposed to reuse the same directory the backup form already checks.

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Write a CSV to an absolute path outside bpath as rootPOST /mysql/csv.cgi dest=1 file=/tmp/h32-csv-write.csv when buser=rootIntegrity (host file write)Lab-proven. File contains WEBMIN-H32-CSV-WRITE
Overwrite an existing path the miniserv user can writesame sink, open_tempfile(OUT, ">$in{'file'}") then renameIntegrityInferred from open_tempfile / close_tempfile. Lab wrote a new /tmp file
Write as a non-root busersame CGI, command_as_user cat > plus quote_pathIntegrity (as that Unix user)Source. Lab used buser=root
Knock the host over by replacing a config the process later readssame writeAvailabilityInferred. Not the lab oracle
Negative control: Backup Database to the same pathPOST /mysql/backup_db.cgi dest=0 file=/tmp/h32-csv-write.csvn/aLab-proven. Invalid backup path / Backups can only be created under. File not created

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
IntegrityBackup Database local dumpbackup_db.cgi calls is_under_directory($access{'bpath'}, $in{'file'})
IntegrityCSV to the browserdest=0 prints text/plain to STDOUT. No host write
IntegrityCSV with buser unsetForm hides the file field. CGI errors cvs_ebuser
IntegrityCSV when edonly=1csv.cgi errors dbase_ecannot
IntegrityCustom-command parameter injectionFixed in 2.670. Different module
IntegrityUnauthenticated writeSession required
IntegrityShell metacharacters on the non-root branchquote_path on cat >. This leftover is the file op
ReconReading a file the user cannot already SELECTCSV is a write of query output, not a file read

This is a write. It is not a file read. It is not a command string. I did not treat crontab or authorized_keys overwrite as proven RCE.

How I found it

I pinned webmin/webmin tag 2.670. The policy at webmin.com/security says fine-grained ACLs are the control. bpath is that control for MySQL dumps. backup_db.cgi checks it. csv.cgi asks for buser and an absolute path, then opens the file.

Wrong turns: treating the CSV where box as SQL injection (the same user already has Execute SQL); treating two-arg open as a pipe on Perl 5.34; treating the already-public custom-command bug as this path.

Lab

Docker, git, python3. The launcher clones webmin/webmin at 3a2b2b8671c0669c129f5275b3dd1853106ae02b when the shared image is missing. MariaDB is the sibling container.

python3 webmin-mysql-csv-write-Abraxas-Labs.py

or:

cd lab
./run.sh

Target only http://127.0.0.1:18420. Image webmin-lab:2.670. Compose webminh32. The limited user is csvuser / csvpass. Module ACL is dbs=labdb, bpath=/var/webmin/mysql-jail, buser=root, edonly=0. Loopback only.

IOC image=webmin-lab:2.670 label-version=2.670
IOC webmin-version=2.670 expect=2.670
IOC acl=dbs=labdb;create=0;delete=0;stop=0;perms=0;bpath=/var/webmin/mysql-jail;buser=root;edonly=0;indexes=0;views=0;noconfig=1;
IOC login-page status=200
IOC login status=302 sid=1
IOC backup-neg http=200 denied=1 wrote=0
IOC csv-file='"WEBMIN-H32-CSV-WRITE"'
SUCCESS WEBMIN-H32-MYSQL-CSV WEBMIN-H32-CSV-WRITE

The fix

Apply bpath the way backup_db.cgi already does:

if (!$in{'dest'} && !&is_under_directory($access{'bpath'}, $in{'file'})) {

On CSV, dest=1 is the file. Refuse unless is_under_directory($access{'bpath'}, $in{'file'}). Do it before open_tempfile and before the cat > branch.

References

  • github.com/webmin/webmin tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
  • mysql/csv.cgi (csv.cgi:11-14, :34-44)
  • mysql/backup_db.cgi (backup_db.cgi:43-46)
  • mysql/csv_form.cgi (csv_form.cgi:25-31)
  • is_under_directory (web-lib-funcs.pl:10878)
  • Policy: webmin.com/security
  • CWE-22

License

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

Abraxas Labs [email protected]

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    916
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    558
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    370
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    317
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →