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
webmin-batch-home-prefix — Webmin 2.670 - Medium 6.5 - Remote - Path prefix - Users batch home ACL /home/a also matches /home/ab | Kitploit
Tools/GitHubGitHub/abraxas/webmin-batch-home-prefix
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingLabs & Practice
GitHub
Share
abraxas/webmin-batch-home-prefix

webmin-batch-home-prefix

Webmin 2.670 - Medium 6.5 - Remote - Path prefix - Users batch home ACL /home/a also matches /home/ab

View Repository
7 days agoNot yet reviewed

Abraxas Labs - webmin-batch-home-prefix

webmin-batch-home-prefix

Webmin Users and Groups lets you tell a help-desk account: new homes go under this directory, nowhere else. On 2.670 that fence is real on the Create User form. It is not real on batch create. Give them home=/home/a and they can still mkdir /home/ab, because batch compares the first six characters and never puts the slash on.

This is not anonymous. This is not a shell module. Root already handed them Users and Groups. The leftover is the importer, not the form.

Class: Path prefix bypass Reach: Remote (Users and Groups batch create, home ACL without trailing slash)

Webmin 2.670 (3a2b2b86) - Webmin

IDno CVE yet
ClassPath prefix bypass
ReachRemote (authenticated Users and Groups batch create; home ACL without a trailing slash)
CWECWE-22
CVSSMedium: 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
ProductWebmin
Affected2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
Authsigned-in Webmin user with Users and Groups ucreate + batch, home=/home/a, autohome off
LicenseGNU Affero GPL v3.0
Lab127.0.0.1:18460 only

I pinned public tag 2.670 commit 3a2b2b8671c0669c129f5275b3dd1853106ae02b. The lab clones that tag, builds webmin-lab:2.670, and logs in as limited. Batch create of h31batch with home /home/ab succeeds. The same home on save_user.cgi is denied.

What an attacker can do

Needs an existing Webmin login that already has the Users and Groups module, batch create (or modify), and a home ACL that does not end in /. Default home=/ is the whole disk and is not this leftover. autohome=1 skips the check on both paths.

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Create an OS user whose home is a prefix neighbor of the ACLAuthenticated POST /useradmin/batch_exec.cgi source=2 batch line create:h31batch:...:/home/ab:...Integrity (passwd + home dir)Lab-proven. Body Created user h31batch. /home/ab exists. /etc/passwd has h31batch:
mkdir that home as the miniserv usercheck_user then create_home_directory (batch_exec.cgi:204, user-lib.pl:2775)Integrity (directory create)Lab-proven. Home did not exist before the POST
Same prefix on modify + movehomecheck_user(\%user, \%olduser) then mv (batch_exec.cgi:499, batch_exec.cgi:517)Integrity (rename home)Inferred from source. Lab oracle is create
/home/a/../ab as a batch homesame substr of length(access home)IntegrityInferred from source. is_under_directory rejects ..; check_user does not
Same helper in LDAP Users batchldap-useradmin/batch_exec.cgi:566IntegrityInferred. Same raw prefix. Not this lab
Negative control: Create User formPOST /useradmin/save_user.cgi with home /home/abn/aLab-proven. Denied. No h31save in passwd. /home/ab still the batch home

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
IntegritySingle-user create / savesave_user.cgi:237 calls is_under_directory, which appends a slash
IntegrityTrailing-slash ACL home=/home/a/Raw prefix then fails for /home/ab. The leftover is the ACL without that slash
Integrityautohome=1Both CGIs skip the home-root check. That is the documented grant
ReconAnonymous batchNeeds a sid and the useradmin module
IntegrityFile Manager search / chooser listingFixed in 2.670. Not this CGI
Integritychooser.cgi chroot prefixDifferent leftover. Names and mtimes, not user create
IntegrityCustom-command injectionFixed in 2.670. Not this module

The ACL home is typed in Webmin Users and Groups ACL as a path. Operators type /home/a, not /home/a/. is_under_directory already knew that. check_user did not.

How I found it

I sat on useradmin/save_user.cgi after the 2.670 File Manager prefix work. That CGI now calls is_under_directory. batch_exec.cgi still has its own check_user that takes substr($home, 0, length($access{home})). Six characters of /home/ab are /home/a.

Wrong turns: treating default home=/ as the hole (the whole disk is the grant); treating File Manager listing as this CGI; treating chooser.cgi chroot as the same prefix; expecting save_user.cgi to also accept /home/ab (it does not; that is the negative); a reverse shell. Theatre.

Lab

python3 webmin-batch-home-prefix-Abraxas-Labs.py

or:

cd lab
./run.sh

Clones webmin/webmin tag 2.670 into lab/src, builds webmin-lab:2.670, binds 127.0.0.1:18460. Docker, git, python3. Loopback only.

IOC limited-acl home=/home/a ucreate=1 batch=1 autohome=0
IOC batch_exec status=200 created=1 denied=0
IOC batch-home /home/ab exists=1
IOC save_user status=200 denied=1 passwd=0
SUCCESS WEBMIN-H31-BATCH-PREFIX batch-prefix-home save_user-denied WEBMIN-H31-BATCH-PREFIX

The fix

Call is_under_directory($access{'home'}, $user->{'home'}) from check_user the way save_user.cgi already does. Do not compare a raw substr of length($access{'home'}). Append the slash, or refuse .., or both. Same change in ldap-useradmin/batch_exec.cgi.

Until then, put a trailing slash on every Users and Groups home ACL that is meant to be a directory root.

References

  • github.com/webmin/webmin tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
  • useradmin/batch_exec.cgi check_user
  • useradmin/save_user.cgi is_under_directory
  • web-lib-funcs.pl is_under_directory
  • 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.

    871
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    548
  • 3

    ARTEX

    baarai/artex

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

    383
  • 4

    redforge

    cybersecurity91/redforge

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

    361
  • 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.

    305
  • 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.

    280

Explore all tools

Browse our collection of tools

View all tools →