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-firewalld-csrf
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityLabs & Practice
GitHubabraxas/webmin-firewalld-csrf

webmin-firewalld-csrf

Webmin 2.670 - High 8.0 - Remote - CSRF - firewalld index.cgi referer-exempt sets default zone trusted

View Repository
7 days agoNot yet reviewed
Share

Abraxas Labs - webmin-firewalld-csrf

webmin-firewalld-csrf

Webmin's referer check treats every module's index.cgi as safe. FirewallD's index is not a dashboard. ?defzone=1&zone=trusted returns 302 to default_zone.cgi, which runs firewall-cmd --set-default-zone trusted. The session cookie is SameSite=Lax, so a normal click from a foreign page still sends it. Direct GET of the setter with a foreign Referer is the Security Warning. The hop through index is not.

You are logged into the FirewallD module. Someone gets you to open a link. Your default zone becomes trusted, which is ACCEPT. They never had your password. You never confirmed a form. Logged out, this does nothing. A POST from a foreign site would not send a Lax cookie. This path is a GET.

Class: CSRF Reach: Remote (logged-in firewalld user, top-level GET, SameSite=Lax)

Webmin 2.670 (3a2b2b86) - Webmin

IDno CVE yet
ClassCSRF
ReachRemote (logged-in FirewallD user, top-level GET, SameSite=Lax)
CWECWE-352
CVSSHigh: 8.0 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
ProductWebmin
Affected2.670 tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
AuthVictim Webmin session with the FirewallD module. No CSRF token. Cookie is SameSite=Lax unless no_samesite is set.
LicenseGNU Affero GPL v3.0
Lab127.0.0.1:18450 only

What an attacker can do

Needs the victim already signed in with FirewallD. Default root can. The CGI runs firewall-cmd as the miniserv user, usually root. No extra ACL on this action. The host has to be Linux with FirewallD; the module ships os_support=*-linux.

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Set the default firewalld zone to trusted (ACCEPT)GET /firewalld/index.cgi?defzone=1&zone=trusted with a foreign Referer; 302 to default_zone.cgi; firewall-cmd --set-default-zone trustedIntegrity + availability (host firewall)Lab-proven. Witness WEBMIN-H24-FIREWALLD-CSRF --set-default-zone trusted. Hops 302,302,200
Same setter for any existing zone nameSame index hop with zone= of a built-in zone (drop, public, …)Integrity + availabilityInferred. Lab used trusted. default_zone.cgi greps list_firewalld_zones
Negative control: hit the setter with a foreign RefererGET /firewalld/default_zone.cgi?zone=trustedn/aLab-proven. Status 200, body Security Warning, witness empty
Negative control: no sessionSame GET without sidn/aClosed. miniserv login gate

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
IntegrityDirect default_zone.cgi from a foreign originreferers_none=1 plus host mismatch. Security Warning
IntegrityCross-site POSTSameSite=Lax does not send the cookie on a cross-site POST
Integritydelete_zone.cgi / zone_form.cgi from the same index buttonsDelete asks for confirm. Create is a POST form. Direct CGI still has a Referer check
IntegrityUnauthenticated FirewallDLogin required
IntegrityClickjacking, setup.pl with referers offNot this path. Package setup.sh writes referers_none=1

The referer check is not broken on the setter. It is skipped on the page that 302s into the setter. After the 302 the browser's Referer is the Webmin index URL, so the second hop matches HTTP_HOST and goes through.

How I found it

CSRF class on tag 2.670. web-lib-funcs.pl sets trust=1 when SCRIPT_NAME is /<module>/index.cgi. firewalld/index.cgi:21 is the odd index: defzone calls &redirect("default_zone.cgi?zone=..."). miniserv turns that Location into 302 (miniserv-lib.pl:2484). default_firewalld_zone runs --set-default-zone with no confirm. Cookie SameSite=Lax unless no_samesite (miniserv-lib.pl:3236).

Wrong turns: treating default_zone.cgi as the CSRF (foreign Referer is blocked); treating referers_none=1 as closed; treating this as the old setup.pl referer-off XSS; treating it as clickjacking; looking for a POST (Lax would not send the cookie).

Lab

python3 webmin-firewalld-csrf-Abraxas-Labs.py

or:

cd lab
./run.sh

Clones webmin/webmin tag 2.670 (3a2b2b86) into lab/src, builds webmin-lab:2.670 if missing, and talks to http://127.0.0.1:18450. The container has no firewalld. lab/firewall-cmd is a PATH stub that logs --set-default-zone. Loopback only. Docker, git, python3.

IOC image=webmin-lab:2.670 label-version=2.670 file-version=2.670
IOC login-server=MiniServ sid=1
IOC negative-status=200 warning=1 witness-empty=1
IOC csrf-hops=302,302,200 first-location=http://127.0.0.1:18450/firewalld/default_zone.cgi?zone=trusted
IOC witness=WEBMIN-H24-FIREWALLD-CSRF --set-default-zone trusted argv=--set-default-zone trusted
SUCCESS WEBMIN-H24-FIREWALLD-CSRF WEBMIN-H24-FIREWALLD-CSRF

The fix

Do not trust index.cgi when it mutates. Require a confirm POST for --set-default-zone. SameSite=Strict, or a CSRF token that the GET hop cannot satisfy.

References

  • github.com/webmin/webmin tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
  • firewalld/index.cgi (index.cgi:21)
  • firewalld/default_zone.cgi (default_zone.cgi:19)
  • firewalld/firewalld-lib.pl default_firewalld_zone (firewalld-lib.pl:396)
  • web-lib-funcs.pl trust=1 for /<module>/index.cgi
  • CWE-352

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.

    911
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    548
  • 3

    redforge

    cybersecurity91/redforge

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

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

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

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

    287

Explore all tools

Browse our collection of tools

View all tools →