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-filemin-cpio — Webmin 2.670 - High 8.8 - Remote - Path write - File Manager extracts RPM whose cpio member is an absolute path | Kitploit
Tools/GitHubGitHub/abraxas/webmin-filemin-cpio
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLabs & Practice
GitHubabraxas/webmin-filemin-cpio

webmin-filemin-cpio

Webmin 2.670 - High 8.8 - Remote - Path write - File Manager extracts RPM whose cpio member is an absolute path

View Repository
7 days agoNot yet reviewed
Share

Abraxas Labs - webmin-filemin-cpio

webmin-filemin-cpio

You give someone File Manager and one folder. They unpack an RPM. The archive sat in that folder. The files inside it did not.

Webmin File Manager is supposed to keep a signed-in user inside allowed_paths. When that jail is a real directory, and work_as_root is still on (the shipped default), extracting an RPM runs rpm2cpio | cpio -idmv with no --no-absolute-filenames. GNU cpio then writes member names that start with / wherever those names point, as root. This is not the default $HOME ACL, which Webmin already expands to the whole disk. It is a user who was fenced, unpacking an archive that looks like it belongs in the fence.

I pinned Webmin 2.670. extract.cgi checks the RPM path. It never looks at the cpio members. I built a tiny RPM whose payload is one file named /tmp/WEBMIN-H10-CPIO-WRITE. After the File Manager extract, that path existed outside /lab/jail.

Class: Path write Reach: Remote (File Manager, work_as_root, real allowed_paths jail)

Webmin 2.670 (3a2b2b86) - Webmin

IDno CVE yet
ClassPath write
ReachRemote (signed-in File Manager user; work_as_root; real allowed_paths jail; rpm2cpio on the host)
CWECWE-22
CVSSHigh: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
ProductWebmin
Affected2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
Authsigned-in File Manager user. Not anonymous. Not default $HOME=/.
LicenseGNU Affero GPL v3.0
Lab127.0.0.1:18430 only. Witness file write, not a shell.

What an attacker can do

Needs a Webmin login that already has File Manager, work_as_root=1, and allowed_paths set to a real directory that is not the whole disk. Needs rpm2cpio and cpio on the host (typical on RPM-based installs; Debian's hard Depends are tar and unzip, not rpm2cpio). Shared MIME info types *.rpm as application/x-rpm, which is the branch that pipes to cpio.

The write is as the miniserv user, which is root when work_as_root is on. The later chown -R in extract_files only covers the intended extract directory, so slipped files stay root-owned.

PrivilegeMethod / sinkRecon / integrity / availabilityLab-proven or inferred
Write a file at an absolute cpio member path outside allowed_pathsGET /filemin/extract.cgi path= file=h10.rpm after upload; rpm2cpio | cpio -idmvIntegrity (root file write)Lab-proven. /tmp/WEBMIN-H10-CPIO-WRITE held WEBMIN-H10-CPIO-WRITE
Same write via extract-on-uploadPOST /filemin/upload.cgi with extract_uploaded; extract_files cpio -idmvIntegrityInferred. Same argv. Lab used the listing extract CGI
Overwrite any path root can create (cron, keys, miniserv.conf, a CGI under the Webmin root)same sink, chosen member nameIntegrity / availabilityInferred from GNU cpio absolute extract. Not this lab's oracle
Negative control: relative extract inside the jailsame RPM if the member were h10/tmp/...n/aLab-proven. Fail token relative-inside-jail if that path exists

Stays closed on this leftover

AxisMethod / sinkWhy it is closed
IntegrityDefault File Manager ACL allowed_paths=$HOMEget_allowed_paths expands a single $HOME or $ROOT for root to /. That install already has the whole disk. Not this bug.
IntegrityOrdinary upload of /tmp/... as the file namevalidate_filename_path checks the archive name and the -C directory. It does not read cpio members.
Integritydownload.cgiForces application/x-download. Does not take this MIME branch.
IntegrityGNU tar member names with ..tar xfp skips those names. Separate from this RPM/cpio path.
Integrityunzip ../unzip 6.0 strips ../ unless -:, which this code never passes.
IntegrityUsermin / safeacl / work_as_root offProcess uid becomes the Unix user first. Same member write is only that uid.
IntegrityCVE-2026-49103mailboxes/detachall.cgi attachment filename, fixed before 2.640. Different module.
IntegrityFile Manager search/chooser listingClosed on 2.670. Listing is not extract.
IntegrityUnauthenticated extractminiserv requires a session.
IntegrityHost RCE in this labOracle is a witness file. No shell.

A File Manager grant is not a shell module. The product's own policy treats fine-grained ACLs as the control. allowed_paths is that control. This extract skips it.

How I found it

I read filemin/extract.cgi on tag 2.670. The RPM branch is:

$cmd = "(rpm2cpio ".
        quotemeta($full).
        " | (cd ".quotemeta($path).
        "; cpio -idmv))";

quotemeta is on the archive path and the cwd. The payload names never enter Perl. GNU cpio's default is still to honor absolute members unless you pass --no-absolute-filenames.

Wrong turns, in order: treating default $HOME=/ as this bug; chasing tar .. and unzip ../; mixing this with CVE-2026-49103; calling ordinary upload a miss when validate_filename_path already holds the file name.

Lab

python3 webmin-filemin-cpio-Abraxas-Labs.py

or:

cd lab
./run.sh

Clones webmin/webmin tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b) into lab/src, builds webmin-lab:2.670, binds 127.0.0.1:18430. Limited user fileuser has File Manager only. Jail /lab/jail. work_as_root=1. Uploads a lab RPM, GET extract. Target only loopback. Witness file write. Not a shell.

IOC pin-version=2.670 image=webmin-lab:2.670 expect=2.670
IOC rpm2cpio-list rc=0 /tmp/WEBMIN-H10-CPIO-WRITE
IOC mime=application/x-rpm
IOC outside-file='WEBMIN-H10-CPIO-WRITE\n'
SUCCESS WEBMIN-H10-FILEMIN-CPIO extract.cgi absolute-cpio WEBMIN-H10-CPIO-WRITE

The fix

Pass --no-absolute-filenames to cpio. Reject members whose names are absolute or contain .. before extract. Keep the jail check on the archive name; add the same check to the payload names.

References

  • github.com/webmin/webmin tag 2.670 (3a2b2b8671c0669c129f5275b3dd1853106ae02b)
  • filemin/extract.cgi (extract.cgi:43-51)
  • filemin/filemin-lib.pl extract_files (filemin-lib.pl:1150-1176), validate_filename_path (:896-925), get_allowed_paths (:252-258)
  • filemin/defaultacl
  • Nearby (not this path): CVE-2026-49103 mailboxes/detachall.cgi
  • 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.

No popularity data yet.

Explore all tools

Browse our collection of tools

View all tools →