
OPNsense 26.7.6 - उच्च - रिमोट - विशेषाधिकार शेष - UidField uid 0
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · opnsense-uidfield-system-uid0
Class: Privilege leftover Reach: Remote
OPNsense core 26.7.6 (a842fe48) - opnsense.org
प्रतिनिधिक page-system-usermanager दो-चरणीय scope=system फिर uid=0। UidField::setValue स्वतः 2000+ असाइन करता है केवल तब जब scope system न हो। setNodes uid को scope से पहले लागू करता है, इसलिए एक add 0 स्टाम्प नहीं कर सकता। दूसरा POST कर सकता है। auth sync user फिर pw useradd -o -u 0 होम /root और समूह wheel के साथ। Authorized keys /root/.ssh/authorized_keys में पहुँचती हैं। Privilege System: Access: Management है, page-all नहीं।
| ID | अभी तक कोई CVE नहीं |
| Class | Privilege leftover |
| Reach | Remote (प्रमाणित WebGUI / Local API key) |
| CWE | CWE-269 / CWE-284 |
| CVSS | High: 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Product | OPNsense core (Deciso B.V.) |
| Affected | OPNsense core 26.7.6 (a842fe48c21288d11a422cb944678e8eb308becf) UidField / user-manager |
| Auth | WebGUI session या Local API key जिसमें page-system-usermanager हो |
| License | GNU Affero GPL v3.0 |
| Lab | केवल 127.0.0.1 |
मैंने tag 26.7.6 "Xenial Xenops" पिन किया। Lab pinned UidField::setValue plus local_user_set का PHP gadget है, loopback identity 127.0.0.1:18810। stable/26.7 ने UID-0 write को 2026-10-09 को ea4f01fe के रूप में revert किया। वह revert इस pin का नहीं है। कोई GHSA नहीं।
| Method | Sink | Privilege |
|---|---|---|
two-step add scope=system फिर uid=0 सेट करें फिर auth sync user | pin UidField::setValue फिर stub pw useradd -o -u 0 (auth.inc:345-397) | Integrity (lab-proven): दूसरा Unix UID 0, home /root, group wheel. Lab: after-add=2000 after-set=0 pw-o-u0=yes. |
| same set + authorizedkeys | file_put_contents /root/.ssh/authorized_keys (auth.inc:407-416) | Integrity (lab-proven): /root/.ssh/authorized_keys में witness। |
SSH उस नाम से यदि sshd चालू हो (AllowGroups wheel; PermitRootLogin non-root username पर लागू नहीं होता) | sshd | Recon + integrity (inferred): नए wheel नाम से login करें, /root पढ़ें। Gadget ने sshd शुरू नहीं किया। |
same POSTs scope=user uid=0 के साथ | UidField auto-assign 2000+ | Negative (lab-proven): uid 2000 ही रहता है। scope-user-uid0-ignored=yes. |
set stock root uuid uid=80 | pw usermod -u 80 | Integrity + availability (inferred): stock root को UID 0 से हटाएँ। Gadget ने root को usermod नहीं किया। |
set root uuid name=hax + scope=user | rename check छोड़ा गया; नए नाम पर auth sync user | Integrity (inferred): system user rename जिसे 26.7.6 check रोकने के लिए था। |
Lab-proven vs inferred: two-step UID 0, pw useradd -o -u 0, keys path, और scope=user ignore lab SUCCESS हैं। Live sshd accept और stock-root usermod/rename inferred हैं। Gadget, पूर्ण OPNsense VM नहीं।
Requires: WebGUI session या Local API key जिसमें page-system-usermanager हो। session path पर CSRF। page-all नहीं। Default config.xml.sample केवल group admins को page-all देता है।
| Surface | Lab |
|---|---|
POST /api/auth/user/* बिना page-system-usermanager | ACL closed |
user-config-readonly | save() अभी भी throwReadOnly() |
| CSV upload | uid/scope हटाता है |
| CVE-2026-44194 email-as-shell | mwexecf %s + email regex |
| Password page | session-bound |
page-all वही POST करना | इस pin पर changelog feature |
| Unauth | closed |
Unix su master.passwd में * के साथ | GUI hash config.xml में रहता है जब तक installer force न करे |
कोई unauth नहीं। page-all आवश्यक नहीं। 26.7.6 ने system-scope users के लिए chosen UID को admin feature के रूप में प्रस्तुत किया। unmatched walk page-all के बिना delegated user-manager है।
cd lab
./run.sh
Loopback 127.0.0.1:18810। Compose project opnsense-uidfield-system-uid0। Image pin 26.7.6 से। Witness OPNSENSE-UIDFIELD-SYSTEM-UID0-WITNESS। अंतिम पंक्ति:
SUCCESS opnsense-uidfield-system-uid0 two-step-uid=0 scope-user-uid0-ignored=yes pw-o-u0=yes keys=/root/.ssh/authorized_keys OPNSENSE-UIDFIELD-SYSTEM-UID0-WITNESS
UID 0 (और colliding service UIDs) को अस्वीकार करें जब तक caller पूर्ण admin न हो। setNodes में scope को uid से पहले लागू करें, या ऐसा POST अस्वीकार करें जो दोनों बदलता हो। 26.7.6 rename check को pre-setNodes scope पर रखें, posted scope पर नहीं। ea4f01fe ने बाद में stable/26.7 पर UID-0 write revert किया; वह commit इस pin का नहीं है।
a842fe48c21288d11a422cb944678e8eb308becfUidField.phpauth.inc local_user_setea4f01fe on stable/26.7