fix(security): OC10-75 - restrict AppConfigController read methods to full admins only#41550
fix(security): OC10-75 - restrict AppConfigController read methods to full admins only#41550DeepDiver1975 wants to merge 4 commits into
Conversation
…ns only OC10-75: Subadmins could read all oc_appconfig values including SMTP passwords and LDAP credentials via getApps/getKeys/getValue endpoints. Remove @NoAdminRequired so AdminMiddleware enforces full-admin-only access, consistent with the write methods. CVSS: 7.7 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
…heckbox state The umgmt_set_password value is already rendered server-side into #CheckBoxPasswordOnUserCreate's checked attribute. Remove the redundant AJAX call which would now return 403 for Subadmins after the security fix. Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
288cb95 to
d00ecca
Compare
jvillafanez
left a comment
There was a problem hiding this comment.
We need to check how subadmins are impacted in the web UI. There might be broken operations.
Based on the analysis on where these endpoints are called - only users.js was affected. But please feel free to test this as well - an additional pair of eyes is much appreciated 🙏 |
I guess not saving the state is acceptable as side effect of this sec fix. The UI behaves correct ... |
no idea when (if?) this changed - never really using subadmin .... |
This seems to be expected (https://github.com/owncloud/core/blob/master/settings/js/users/users.js#L433-L438). Basically, for the subdamin, we require the users to be part of a group controlled by the subadmin. If there is only one group, it won't be possible to remove the user from that group, but if there are multiple groups the subadmin can move the users around those groups. |

Summary
@NoAdminRequiredfromgetApps(),getKeys(), andgetValue()inAppConfigControllerso the AppFramework'sAdminMiddlewareblocks Subadmin users from reading alloc_appconfigvalues (SMTP passwords, LDAP bind credentials, encryption master keys, etc.)OC.AppConfig.getValueAJAX call insettings/js/users/users.jswith a synchronous DOM read of the server-rendered checkbox state — preserving correct UI behavior on the Subadmin-accessible/settings/userspageAppConfigControllerclass docblock to accurately reflect that all methods now require full admin privilegesDetails
The three read endpoints were annotated with
@NoAdminRequired, which causedSecurityMiddlewareto skip the admin check. Subadmins could exploit this to enumerate all app config keys and read any value — including credentials stored by SMTP, LDAP, OAuth, and encryption apps.Write methods (
setValue,deleteKey,deleteApp) were already admin-only. This PR makes the read methods consistent with them.A cross-repo search of the entire ownCloud GitHub org found no other apps using the affected endpoints from Subadmin accessible UI, with one exception fixed here.
Reported by Pablo Giovanni. Confirmed on ownCloud 10.14.0 and 10.16.1.
Fixes: OC10-75
Test Plan
GET /index.php/settings/appconfig→ HTTP 403GET /index.php/settings/appconfig→ HTTP 200/settings/users→ password/email field toggles correctly on page load/settings/users→ same behavior