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-sessiondb-cookie — Webmin 2.670 - Critical 9.1 - Remote - Session theft - list_sessions prints sessiondb key; miniserv accepts it as sid. A signed-in user granted session view but denied switch can copy another user's key and become that user, including root. | Kitploit
Tools/GitHubGitHub/abraxas/webmin-sessiondb-cookie
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityAuthenticationLabs & Practice
GitHub
Share
abraxas/webmin-sessiondb-cookie

webmin-sessiondb-cookie

Webmin 2.670 - Critical 9.1 - Remote - Session theft - list_sessions prints sessiondb key; miniserv accepts it as sid. A signed-in user granted session view but denied switch can copy another user's key and become that user, including root.

View Repository
7 days agoNot yet reviewed

Abraxas Labs - webmin-sessiondb-cookie

webmin-sessiondb-cookie

Webmin will let you give someone the Webmin Users page that lists who is signed in, and separately refuse them the switch-user grant. That split is the product. The list page still prints a hex string next to every live login. That string is the session database key. miniserv will take it as the sid cookie. A coworker who was only supposed to see and cancel sessions becomes whoever is on the list, including the root Webmin user.

I planted sessions=1 and switch=0 on a second login, confirmed switch stayed denied, copied root's key off the HTML, and put it in a cookie. I was root. session_ip was not in miniserv.conf. That is the default.

Class: Session theft Reach: Remote (signed-in user with acl sessions=1, switch=0)

Webmin 2.670 (3a2b2b86) - webmin/webmin

IDno CVE yet
ClassSession theft (printed sessiondb key is a live cookie)
ReachRemote (signed-in; sessions=1; switch denied)
CWECWE-287
CVSSCritical: 9.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
ProductWebmin
Affected2.670 tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
Authcookie login; Webmin Users module; sessions=1; switch=0; a second live session to steal
LicenseGNU Affero GPL v3.0
Labloopback 127.0.0.1:18440. Compose webminh27. Two logins.

What an attacker can do

Needs a signed-in Webmin user who was given the Webmin Users module and the sessions ACL, and who was denied switch. In ordinary words: the helpdesk grant that is supposed to show who is logged in, not become them. Root, or anyone else with a live session, has to be signed in at the same time. The attacker does not need the victim's password.

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Confirm session_ip is offminiserv.conf has no session_ip= after setup.shReconLab-proven. session_ip=off
Confirm the planted ACLacl/limited.acl users=~ sessions=1 switch=0ReconLab-proven
Switch into root stays deniedGET /acl/switch.cgi?user=root as limitedn/a (negative)Lab-proven. You are not allowed to switch to this user
Edit root as limited stays deniedGET /acl/edit_user.cgi?user=root as limitedn/a (negative)Lab-proven. You are not allowed to edit this user
Read every live sessiondb key, including rootGET /acl/list_sessions.cgi prints <tt>$k</tt>Recon (session secret)Lab-proven. 64-char HMAC hex
Become that user by sending the printed key as the cookieCookie: sid=<sessiondb key> against miniserv verifyIntegrity (authn)Lab-proven. edit_user.cgi?user=root as root
Act as root for the life of that sessionSame stolen cookie on later module CGIsIntegrity / recon of root's modulesInferred from the stolen identity. Lab showed the Users editor as root

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
IntegrityGET /acl/switch.cgiStill needs can_edit_user and access{'switch'}. Lab denied it
IntegrityGET /acl/edit_user.cgi?user=root as the limited loginusers=~ only matches self
IntegrityUnauthenticated callerNeeds a signed-in sessions=1 user and a second live session
IntegrityNew session insertnew stores under hash_session_id($cookie), not the raw cookie
IntegritySession DB and HMAC key filesCreated mode 0600. This leftover is the HTML, not the files
IntegrityShipped admin / adminsetup.bat only. rpm/deb postinst sets crypt=x
AvailabilityKilling other sessionsdelete_session.cgi is the intended sessions=1 grant, not this leftover

The HMAC on insert is real. The parser still accepts the stored key if you send it. That is the mismatch. A second class note on the same two lines was the same bug, not a second issue.

How I found it

I was reading the Webmin Users module for a grant that was denied on paper and still reached a sink. switch.cgi does what the ACL says. list_sessions.cgi only checks sessions. Line 57 prints $k. $k is the DBM key.

New logins go in under HMAC-SHA256 of the cookie (miniserv.pl new handler). The verify handler does $sessiondb{$session_id} ? $session_id : hash_session_id($session_id). If the cookie is already a key, hashing is skipped. The cookie regex is [a-f0-9]+. A 64-char hex HMAC matches. session_ip is a checkbox that is off unless someone turns it on, so the stolen key works from another client.

Wrong turns, in order: treating the <tt> as a display id that still had to be HMAC'd before it would verify; treating switch.cgi as the only impersonation path; assuming session_ip was on because the UI exists; filing the verify-handler note as a second leftover.

Lab

python3 webmin-sessiondb-cookie-Abraxas-Labs.py

or:

cd lab
./run.sh

Clones webmin/webmin tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b) into lab/src and reuses webmin-lab:2.670 when present. Loopback only. Two logins: root / labroot and a planted limited user.

IOC limited-acl users=~ sessions=1 switch=0
IOC session_ip session_ip=off
IOC switch.cgi status=200 denied
IOC edit_user root-as-limited denied=1
IOC stolen-key len=64
IOC replay status=200
SUCCESS WEBMIN-H27-SESSIONDB list_sessions.cgi sid=sessiondb-key became-root WEBMIN-H27-SESSION-KEY

The fix

Stop printing the sessiondb key. Give the UI a truncated handle that is not a lookup key. Make verify look up only hash_session_id($cookie) and refuse a cookie that is already a stored key. Keep switch.cgi as the only impersonation path. Turning session_ip on by default is a useful extra, not a substitute.

References

  • github.com/webmin/webmin tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
  • acl/list_sessions.cgi
  • miniserv.pl verify handler
  • miniserv-lib.pl cookie parse
  • acl/switch.cgi
  • CWE-287
  • webmin.com/security

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.

    837
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

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

    424
  • 4

    redforge

    cybersecurity91/redforge

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

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

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

    276

Explore all tools

Browse our collection of tools

View all tools →